We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f954ab2 commit 1280699Copy full SHA for 1280699
1 file changed
Lib/test/test_codeop.py
@@ -324,19 +324,6 @@ def foo(x,x):
324
pass
325
"""), "duplicate parameter 'x' in function definition")
326
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
-
340
341
if __name__ == "__main__":
342
unittest.main()
0 commit comments