Skip to content

Error in arguments to pytest.mark.parameterize fails all tests #3674

@alphaCTzo7G

Description

@alphaCTzo7G

Thanks for submitting an issue!

Here's a quick checklist in what to include:

  • Include a detailed description of the bug or suggestion
  • pip list of the virtual environment you are using
  • pytest and operating system versions
  • Minimal example if possible

If I have a tests case say

@pytest.mark.parametrize(
	"foo_dict1, expected",
	[
		data_search_foo.second
	]
)
def test_convert_foo_df(self, foo_instance, foo_dict,
							expected):
	foo_df = foo_instance.convert_foo_df(foo_dict)
	assert foo_df == expected

and all other tests, are correctly specified, this will crash the entire
pytest test.

The error in the above is that foo_dict1 should be foo_dict. However, if I
didnt use pytest.mark.parametrize, it seems typographical errors in one
test(test1) only results in the failure of test1, but other tests in the
series of tests can still go on.

Can this be rectified?

Pytest version: 3.4.1
Operating System: Windows 10

Metadata

Metadata

Assignees

No one assigned

    Labels

    topic: parametrizerelated to @pytest.mark.parametrizetype: bugproblem that needs to be addressedtype: questiongeneral question, might be closed after 2 weeks of inactivity

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions