File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -253,7 +253,7 @@ def pytest_configure(config):
253
253
254
254
class TestLastFailed :
255
255
def test_lastfailed_usecase (self , testdir , monkeypatch ):
256
- monkeypatch .setenv ( "PYTHONDONTWRITEBYTECODE " , "1" )
256
+ monkeypatch .setattr ( "sys.dont_write_bytecode " , True )
257
257
p = testdir .makepyfile (
258
258
"""
259
259
def test_1():
@@ -345,7 +345,7 @@ def test_always_fails():
345
345
result .stdout .no_fnmatch_line ("*test_a.py*" )
346
346
347
347
def test_lastfailed_difference_invocations (self , testdir , monkeypatch ):
348
- monkeypatch .setenv ( "PYTHONDONTWRITEBYTECODE " , "1" )
348
+ monkeypatch .setattr ( "sys.dont_write_bytecode " , True )
349
349
testdir .makepyfile (
350
350
test_a = """\
351
351
def test_a1():
@@ -379,7 +379,7 @@ def test_b1():
379
379
result .stdout .fnmatch_lines (["*1 failed*1 desel*" ])
380
380
381
381
def test_lastfailed_usecase_splice (self , testdir , monkeypatch ):
382
- monkeypatch .setenv ( "PYTHONDONTWRITEBYTECODE " , "1" )
382
+ monkeypatch .setattr ( "sys.dont_write_bytecode " , True )
383
383
testdir .makepyfile (
384
384
"""\
385
385
def test_1():
You can’t perform that action at this time.
0 commit comments