Skip to content

Commit eea5ff4

Browse files
committed
Fix issue with pytest_cmdline_preparse
The pytest_cmdline_preparse hook is now deprecated. I think there should be a way to achieve the same effect using pytest_load_initial_conftests https://docs.pytest.org/en/7.1.x/reference/reference.html#pytest.hookspec.pytest_cmdline_preparse However, were were using this to hook to prevent *.pyc and __pycache__ files from being generated. I think it is fine for now to just go back to generating these files.
1 parent 4b3bc18 commit eea5ff4

File tree

1 file changed

+0
-5
lines changed

1 file changed

+0
-5
lines changed

pytest_plugin/pytest_pymtl3.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -66,11 +66,6 @@ def pytest_configure(config):
6666
def pytest_unconfigure(config):
6767
pass
6868

69-
def pytest_cmdline_preparse(config, args):
70-
"""Don't write *.pyc and __pycache__ files."""
71-
import sys
72-
sys.dont_write_bytecode = True
73-
7469
def pytest_runtest_setup(item):
7570
if _any_opts_present(item.config) and 'cmdline_opts' not in item.fixturenames:
7671
pytest.skip("'cmdline_opts' is required by pytest commandline but not used")

0 commit comments

Comments
 (0)