Session's gethookproxy() would cache conftests incorrectly (#2016). It was decided to remove the cache altogether.
(pytester: Pytester)
| 659 | |
| 660 | |
| 661 | def test_hook_proxy(pytester: Pytester) -> None: |
| 662 | """Session's gethookproxy() would cache conftests incorrectly (#2016). |
| 663 | It was decided to remove the cache altogether. |
| 664 | """ |
| 665 | pytester.makepyfile( |
| 666 | **{ |
| 667 | "root/demo-0/test_foo1.py": "def test1(): pass", |
| 668 | "root/demo-a/test_foo2.py": "def test1(): pass", |
| 669 | "root/demo-a/conftest.py": """\ |
| 670 | def pytest_ignore_collect(collection_path, config): |
| 671 | return True |
| 672 | """, |
| 673 | "root/demo-b/test_foo3.py": "def test1(): pass", |
| 674 | "root/demo-c/test_foo4.py": "def test1(): pass", |
| 675 | } |
| 676 | ) |
| 677 | result = pytester.runpytest() |
| 678 | result.stdout.fnmatch_lines( |
| 679 | ["*test_foo1.py*", "*test_foo3.py*", "*test_foo4.py*", "*3 passed*"] |
| 680 | ) |
| 681 | |
| 682 | |
| 683 | def test_required_option_help(pytester: Pytester) -> None: |
nothing calls this directly
no test coverage detected