Improve test for pytest.exit handling
This commit is contained in:
		
							parent
							
								
									d35d09f82d
								
							
						
					
					
						commit
						0824789459
					
				|  | @ -1078,11 +1078,11 @@ def test_exit_outcome(testdir): | ||||||
| 
 | 
 | ||||||
|         class MyTestCase(unittest.TestCase): |         class MyTestCase(unittest.TestCase): | ||||||
|             def test_exit_outcome(self): |             def test_exit_outcome(self): | ||||||
|                 pytest.exit("pytest_exit") |                 pytest.exit("pytest_exit called") | ||||||
| 
 | 
 | ||||||
|             def test_should_not_run(self): |             def test_should_not_run(self): | ||||||
|                 pass |                 pass | ||||||
|     """ |     """ | ||||||
|     ) |     ) | ||||||
|     reprec = testdir.inline_run() |     result = testdir.runpytest() | ||||||
|     reprec.assertoutcome() |     result.stdout.fnmatch_lines("*Exit: pytest_exit called*") | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue