Skip to content

autouse=True of lazy_fixture breaks nose tests #50

@MRigal

Description

@MRigal

Hi all,

We have some legacy nose-style tests in our test suite. They are also run nicely via pytest (https://docs.pytest.org/en/latest/nose.html).

Today I've tried to add a fixture with parametrization using lazy_fixture in combination with autouse=True and the tests are now ERRORing with:

_____ ERROR at setup of MyNoseTestClass.test_foo ________
test_foo does not support fixtures, maybe unittest.TestCase subclass?
Node id: path/test_foo.py::MyNoseTestClass::test_foo
Function type: TestCaseFunction

The indication is right and maybe some check would avoid this issue.

Not that some other fixtures with autouse=True but without lazy_fixture are not changing the test behaviour

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions