lib-python/3/test/test_code_module.py::unmodified
== PyPy 3.12.13 (5810ee7762f1, Aug 01 2026, 03:36:32) [PyPy 8.0.0-alpha0 with GCC 14.2.1 20250110 (Red Hat 14.2.1-11)]
== Linux-6.12.90+deb13-amd64-i686-with-glibc2.28 little-endian
== Python build: release with_assert
== cwd: /tmp/pytest/test_python_worker_695096æ
== CPU count: 9
== encodings: locale=UTF-8 FS=utf-8
== resources (3): curses,gui,network
Using random seed: 4290789763
0:00:00 load avg: 3.30 Run 1 test sequentially in a single process
0:00:00 load avg: 3.30 [1/1] test_code_module
test_banner (test.test_code_module.TestInteractiveConsole.test_banner) ... ok
test_cause_tb (test.test_code_module.TestInteractiveConsole.test_cause_tb) ... FAIL
test_console_stderr (test.test_code_module.TestInteractiveConsole.test_console_stderr) ... ok
test_context_tb (test.test_code_module.TestInteractiveConsole.test_context_tb) ... FAIL
test_exit_msg (test.test_code_module.TestInteractiveConsole.test_exit_msg) ... ok
test_indentation_error (test.test_code_module.TestInteractiveConsole.test_indentation_error) ... ERROR
test_ps1 (test.test_code_module.TestInteractiveConsole.test_ps1) ... ok
test_ps2 (test.test_code_module.TestInteractiveConsole.test_ps2) ... ok
test_syntax_error (test.test_code_module.TestInteractiveConsole.test_syntax_error) ... ERROR
test_sysexcepthook (test.test_code_module.TestInteractiveConsole.test_sysexcepthook) ... ok
test_sysexcepthook_crashing_doesnt_close_repl (test.test_code_module.TestInteractiveConsole.test_sysexcepthook_crashing_doesnt_close_repl) ... FAIL
test_sysexcepthook_indentation_error (test.test_code_module.TestInteractiveConsole.test_sysexcepthook_indentation_error) ... ERROR
test_sysexcepthook_raising_BaseException (test.test_code_module.TestInteractiveConsole.test_sysexcepthook_raising_BaseException) ... FAIL
test_sysexcepthook_raising_SystemExit_gets_through (test.test_code_module.TestInteractiveConsole.test_sysexcepthook_raising_SystemExit_gets_through) ... ok
test_sysexcepthook_syntax_error (test.test_code_module.TestInteractiveConsole.test_sysexcepthook_syntax_error) ... ERROR
test_unicode_error (test.test_code_module.TestInteractiveConsole.test_unicode_error) ... ERROR
======================================================================
ERROR: test_indentation_error (test.test_code_module.TestInteractiveConsole.test_indentation_error)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/buildbot/slave/pypy-c-jit-linux-x86-32/build/lib-python/3/test/test_code_module.py", line 92, in test_indentation_error
self.assertIs(self.sysmod.last_type, IndentationError)
^^^^^^^^^
File "/buildbot/slave/pypy-c-jit-linux-x86-32/build/lib-python/3/unittest/mock.py", line 660, in __getattr__
raise AttributeError("Mock object has no attribute %r" % name)
AttributeError: Mock object has no attribute 'last_type'
======================================================================
ERROR: test_syntax_error (test.test_code_module.TestInteractiveConsole.test_syntax_error)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/buildbot/slave/pypy-c-jit-linux-x86-32/build/lib-python/3/test/test_code_module.py", line 76, in test_syntax_error
self.assertIs(self.sysmod.last_type, SyntaxError)
^^^^^^^^^
File "/buildbot/slave/pypy-c-jit-linux-x86-32/build/lib-python/3/unittest/mock.py", line 660, in __getattr__
raise AttributeError("Mock object has no attribute %r" % name)
AttributeError: Mock object has no attribute 'last_type'
======================================================================
ERROR: test_sysexcepthook_indentation_error (test.test_code_module.TestInteractiveConsole.test_sysexcepthook_indentation_error)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/buildbot/slave/pypy-c-jit-linux-x86-32/build/lib-python/3/test/test_code_module.py", line 163, in test_sysexcepthook_indentation_error
hook.assert_called_with(self.sysmod.last_type,
^^^^^^^^^
File "/buildbot/slave/pypy-c-jit-linux-x86-32/build/lib-python/3/unittest/mock.py", line 660, in __getattr__
raise AttributeError("Mock object has no attribute %r" % name)
AttributeError: Mock object has no attribute 'last_type'
======================================================================
ERROR: test_sysexcepthook_syntax_error (test.test_code_module.TestInteractiveConsole.test_sysexcepthook_syntax_error)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/buildbot/slave/pypy-c-jit-linux-x86-32/build/lib-python/3/test/test_code_module.py", line 143, in test_sysexcepthook_syntax_error
hook.assert_called_with(self.sysmod.last_type,
^^^^^^^^^
File "/buildbot/slave/pypy-c-jit-linux-x86-32/build/lib-python/3/unittest/mock.py", line 660, in __getattr__
raise AttributeError("Mock object has no attribute %r" % name)
AttributeError: Mock object has no attribute 'last_type'
======================================================================
ERROR: test_unicode_error (test.test_code_module.TestInteractiveConsole.test_unicode_error)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/buildbot/slave/pypy-c-jit-linux-x86-32/build/lib-python/3/test/test_code_module.py", line 105, in test_unicode_error
self.assertIs(self.sysmod.last_type, UnicodeEncodeError)
^^^^^^^^^
File "/buildbot/slave/pypy-c-jit-linux-x86-32/build/lib-python/3/unittest/mock.py", line 660, in __getattr__
raise AttributeError("Mock object has no attribute %r" % name)
AttributeError: Mock object has no attribute 'last_type'
======================================================================
FAIL: test_cause_tb (test.test_code_module.TestInteractiveConsole.test_cause_tb)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/buildbot/slave/pypy-c-jit-linux-x86-32/build/lib-python/3/test/test_code_module.py", line 268, in test_cause_tb
self.assertIs(self.sysmod.last_traceback, self.sysmod.last_value.__traceback__)
^^^^^^^^
AssertionError: <traceback object at 0xf3d80cb8> is not <traceback object at 0xf3d80cd0>
======================================================================
FAIL: test_context_tb (test.test_code_module.TestInteractiveConsole.test_context_tb)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/buildbot/slave/pypy-c-jit-linux-x86-32/build/lib-python/3/test/test_code_module.py", line 291, in test_context_tb
self.assertIs(self.sysmod.last_traceback, self.sysmod.last_value.__traceback__)
^^^^^^^^
AssertionError: <traceback object at 0xf3d0cf88> is not <traceback object at 0xf3d0cf70>
======================================================================
FAIL: test_sysexcepthook_crashing_doesnt_close_repl (test.test_code_module.TestInteractiveConsole.test_sysexcepthook_crashing_doesnt_close_repl)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/buildbot/slave/pypy-c-jit-linux-x86-32/build/lib-python/3/test/test_code_module.py", line 180, in test_sysexcepthook_crashing_doesnt_close_repl
self.assertEqual(['write', ('123', ), {}], self.stdout.method_calls[0])
^^^^^^^^^^^
AssertionError: ['write', ('123',), {}] != call.flush()
======================================================================
FAIL: test_sysexcepthook_raising_BaseException (test.test_code_module.TestInteractiveConsole.test_sysexcepthook_raising_BaseException)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/buildbot/slave/pypy-c-jit-linux-x86-32/build/lib-python/3/test/test_code_module.py", line 194, in test_sysexcepthook_raising_BaseException
self.assertEqual(['write', ('123', ), {}], self.stdout.method_calls[0])
^^^^^^^^^^^
AssertionError: ['write', ('123',), {}] != call.flush()
----------------------------------------------------------------------
Ran 16 tests in 0.178s
FAILED (failures=4, errors=5)
0:00:00 load avg: 3.28 [1/1/1] test_code_module failed (5 errors, 4 failures)
== Tests result: FAILURE ==
1 test failed:
test_code_module
Total duration: 397 ms
Total tests: run=16 failures=4
Total test files: run=1/1 failed=1
Result: FAILURE
test test_code_module failed
builder: pypy-c-jit-linux-x86-32 build #8423+
test: lib-python/3/test/test_code_module.py::unmodified