Improve --lf/--ff test as commented during review
This commit is contained in:
		
							parent
							
								
									08d83a5c6a
								
							
						
					
					
						commit
						1125786e78
					
				|  | @ -200,14 +200,16 @@ class TestLastFailed(object): | ||||||
|         ]) |         ]) | ||||||
| 
 | 
 | ||||||
|     def test_lastfailed_failedfirst_order(self, testdir): |     def test_lastfailed_failedfirst_order(self, testdir): | ||||||
|         testdir.tmpdir.join('test_a.py').write(_pytest._code.Source(""" |         testdir.makepyfile(**{ | ||||||
|  |             'test_a.py': """ | ||||||
|                 def test_always_passes(): |                 def test_always_passes(): | ||||||
|                     assert 1 |                     assert 1 | ||||||
|         """)) |             """, | ||||||
|         testdir.tmpdir.join('test_b.py').write(_pytest._code.Source(""" |             'test_b.py': """ | ||||||
|                 def test_always_fails(): |                 def test_always_fails(): | ||||||
|                     assert 0 |                     assert 0 | ||||||
|         """)) |             """, | ||||||
|  |         }) | ||||||
|         result = testdir.runpytest() |         result = testdir.runpytest() | ||||||
|         # Test order will be collection order; alphabetical |         # Test order will be collection order; alphabetical | ||||||
|         result.stdout.fnmatch_lines([ |         result.stdout.fnmatch_lines([ | ||||||
|  | @ -219,6 +221,7 @@ class TestLastFailed(object): | ||||||
|         result.stdout.fnmatch_lines([ |         result.stdout.fnmatch_lines([ | ||||||
|             "test_b.py*", |             "test_b.py*", | ||||||
|         ]) |         ]) | ||||||
|  |         assert 'test_a.py' not in result.stdout.str() | ||||||
| 
 | 
 | ||||||
|     def test_lastfailed_difference_invocations(self, testdir, monkeypatch): |     def test_lastfailed_difference_invocations(self, testdir, monkeypatch): | ||||||
|         monkeypatch.setenv("PYTHONDONTWRITEBYTECODE", 1) |         monkeypatch.setenv("PYTHONDONTWRITEBYTECODE", 1) | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue