File tree Expand file tree Collapse file tree 1 file changed +11
-8
lines changed
Expand file tree Collapse file tree 1 file changed +11
-8
lines changed Original file line number Diff line number Diff line change @@ -200,14 +200,16 @@ def test_always_fails():
200200 ])
201201
202202 def test_lastfailed_failedfirst_order (self , testdir ):
203- testdir .tmpdir .join ('test_a.py' ).write (_pytest ._code .Source ("""
204- def test_always_passes():
205- assert 1
206- """ ))
207- testdir .tmpdir .join ('test_b.py' ).write (_pytest ._code .Source ("""
208- def test_always_fails():
209- assert 0
210- """ ))
203+ testdir .makepyfile (** {
204+ 'test_a.py' : """
205+ def test_always_passes():
206+ assert 1
207+ """ ,
208+ 'test_b.py' : """
209+ def test_always_fails():
210+ assert 0
211+ """ ,
212+ })
211213 result = testdir .runpytest ()
212214 # Test order will be collection order; alphabetical
213215 result .stdout .fnmatch_lines ([
@@ -219,6 +221,7 @@ def test_always_fails():
219221 result .stdout .fnmatch_lines ([
220222 "test_b.py*" ,
221223 ])
224+ assert 'test_a.py' not in result .stdout .str ()
222225
223226 def test_lastfailed_difference_invocations (self , testdir , monkeypatch ):
224227 monkeypatch .setenv ("PYTHONDONTWRITEBYTECODE" , 1 )
You can’t perform that action at this time.
0 commit comments