Elide pytest-internal paths for --fixtures (#9281)

* Elide pytest-internal paths for --fixtures

Fixes #8822

* Make flake8 happy
This commit is contained in:
Florian Bruhin
2021-11-10 15:16:41 +01:00
committed by GitHub
parent f9afcd2d8a
commit 5d87a27434
3 changed files with 24 additions and 11 deletions

View File

@@ -3346,9 +3346,9 @@ class TestShowFixtures:
result = pytester.runpytest("--fixtures")
result.stdout.fnmatch_lines(
[
"tmp_path_factory [[]session scope[]] -- *tmpdir.py*",
"tmp_path_factory [[]session scope[]] -- .../_pytest/tmpdir.py:*",
"*for the test session*",
"tmp_path -- *",
"tmp_path -- .../_pytest/tmpdir.py:*",
"*temporary directory*",
]
)
@@ -3357,9 +3357,9 @@ class TestShowFixtures:
result = pytester.runpytest("--fixtures", "-v")
result.stdout.fnmatch_lines(
[
"tmp_path_factory [[]session scope[]] -- *tmpdir.py*",
"tmp_path_factory [[]session scope[]] -- .../_pytest/tmpdir.py:*",
"*for the test session*",
"tmp_path -- *tmpdir.py*",
"tmp_path -- .../_pytest/tmpdir.py:*",
"*temporary directory*",
]
)