Skip to content

Commit 18f0518

Browse files
committed
fix #5 not able to work with pytest-xdist + --dist loadfile
1 parent 41038ef commit 18f0518

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22

33
## [Unreleased]
44

5+
### Fixed
6+
- Fix not able to work with `pytest-xdist` plugin when `--dist loadfile` is set in configuration file (#5)
7+
58
## [0.3.0] - 2020-08-10
69
### Added
710
- W6401 `deprecated-pytest-yield-fixture`: add warning for [yield_fixture functions](https://docs.pytest.org/en/latest/yieldfixture.html)

pylint_pytest/checkers/fixture.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ def visit_module(self, node):
7272
# run pytest session with customized plugin to collect fixtures
7373
fixture_collector = FixtureCollector()
7474
pytest.main(
75-
[node.file, '--fixtures'],
75+
[node.file, '--fixtures', '--collect-only'],
7676
plugins=[fixture_collector],
7777
)
7878
FixtureChecker._pytest_fixtures = fixture_collector.fixtures

0 commit comments

Comments
 (0)