Test exception path in exception_validate.
(self)
| 99 | tt.ipexec_validate(self.fname, out) |
| 100 | |
| 101 | def test_exception_path(self): |
| 102 | """Test exception path in exception_validate.""" |
| 103 | self.mktmp( |
| 104 | "import sys\n" |
| 105 | "print('A')\n" |
| 106 | "print('B')\n" |
| 107 | "print('C', file=sys.stderr)\n" |
| 108 | "print('D', file=sys.stderr)\n" |
| 109 | ) |
| 110 | out = "A\nB" |
| 111 | tt.ipexec_validate(self.fname, expected_out=out, expected_err="C\nD") |
| 112 | |
| 113 | def test_exception_path2(self): |
| 114 | """Test exception path in exception_validate, expecting windows line endings.""" |