Skip to content

Conversation

@adamchainz
Copy link
Member

Fix this warning seen in the pytest output:

pytest_django/runner.py:6
  /.../pytest-django/pytest_django/runner.py:6: PytestCollectionWarning: cannot collect test class 'TestRunner' because it has a __init__ constructor (from: tests/test_runner.py)
    class TestRunner:

The fix uses __test__ = False to flag the class as non-test.

Fix this warning seen in the pytest output:

```
pytest_django/runner.py:6
  /.../pytest-django/pytest_django/runner.py:6: PytestCollectionWarning: cannot collect test class 'TestRunner' because it has a __init__ constructor (from: tests/test_runner.py)
    class TestRunner:
```

The fix uses [`__test__ = False`](https://docs.pytest.org/en/stable/example/pythoncollection.html#:~:text=boolean%20%5F%5Ftest%5F%5F%20attribute) to flag the class as non-test.
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.

1 participant