Skip to content

fix: honor unpack for positional sequences from file_data - #125

Open
Mirochill wants to merge 1 commit into
datadriventests:masterfrom
Mirochill:fix/file-data-unpack-sequences
Open

Mirochill wants to merge 1 commit into
datadriventests:masterfrom
Mirochill:fix/file-data-unpack-sequences

Conversation

@Mirochill

Copy link
Copy Markdown

When JSON or YAML file data contains positional sequences, @file_data passes each sequence as one argument even if the test also has @unpack. This makes the example in #57 fail while equivalent @data cases work.

Expand list/tuple row values only when the function carries @unpack. Existing mapping-to-keyword argument behavior and undecorated list payloads are preserved. Regression tests cover JSON/YAML, top-level arrays/named mappings, and both enabled/disabled unpacking.

Fixes #57.

Validation: the new regression matrix failed 4 cases before the fix and passes afterward; the complete pytest suite passes (119 tests), and flake8 passes.

Prepared with AI assistance; the patch and tests were independently reviewed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

@unpack, @file_data, and JSON list of lists

1 participant