Skip to content

Commit 1280699

Browse files
committed
Remove test_system_error from test_codeop
1 parent f954ab2 commit 1280699

1 file changed

Lines changed: 0 additions & 13 deletions

File tree

Lib/test/test_codeop.py

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -324,19 +324,6 @@ def foo(x,x):
324324
pass
325325
"""), "duplicate parameter 'x' in function definition")
326326

327-
def test_system_error(self):
328-
# SystemError from the compiler should propagate with context suppressed.
329-
# The first call raises SyntaxError to enter the inner try block;
330-
# the second (source + "\n") raises SystemError.
331-
import unittest.mock as mock
332-
err = SystemError("compiler internal error")
333-
with mock.patch('codeop._compile', side_effect=[SyntaxError(), err]):
334-
with self.assertRaises(SystemError) as cm:
335-
compile_command("x = 1")
336-
self.assertIs(cm.exception, err)
337-
self.assertIsNone(err.__cause__)
338-
self.assertTrue(err.__suppress_context__)
339-
340327

341328
if __name__ == "__main__":
342329
unittest.main()

0 commit comments

Comments
 (0)