Home - Summaries: (main) : (py3.11) : Everything - Nightly builds - Benchmarks - RPython - Builders - About

lib-python/3/test/test_support.py::unmodified

== PyPy 3.11.15 (f0ba547da91c, Jul 01 2026, 03:54:35) [PyPy 7.3.24-alpha0 with MSC v.1941 64 bit (AMD64)]
== Windows-10-10.0.19045-SP0 little-endian
== Python build: release with_assert
== cwd: D:\SystemTemp\pytest\test_python_worker_1524æ
== CPU count: 2
== encodings: locale=ascii FS=utf-8
== resources (3): curses,gui,network

Using random seed: 2554972582
0:00:00 Run 1 test sequentially
0:00:00 [1/1] test_support
test_CleanImport (test.test_support.TestSupport.test_CleanImport) ... ok
test_DirsOnSysPath (test.test_support.TestSupport.test_DirsOnSysPath) ... ok
test_HOST (test.test_support.TestSupport.test_HOST) ... ok
test_args_from_interpreter_flags (test.test_support.TestSupport.test_args_from_interpreter_flags) ... skipped "resource 'cpu' is not enabled"
test_bind_port (test.test_support.TestSupport.test_bind_port) ... ok
test_captured_stderr (test.test_support.TestSupport.test_captured_stderr) ... ok
test_captured_stdin (test.test_support.TestSupport.test_captured_stdin) ... ok
test_captured_stdout (test.test_support.TestSupport.test_captured_stdout) ... ok
test_change_cwd (test.test_support.TestSupport.test_change_cwd) ... ok
test_change_cwd__chdir_warning (test.test_support.TestSupport.test_change_cwd__chdir_warning)
Check the warning message when os.chdir() fails. ... ok
test_change_cwd__non_existent_dir (test.test_support.TestSupport.test_change_cwd__non_existent_dir)
Test passing a non-existent directory. ... ok
test_change_cwd__non_existent_dir__quiet_true (test.test_support.TestSupport.test_change_cwd__non_existent_dir__quiet_true)
Test passing a non-existent directory with quiet=True. ... ok
test_check__all__ (test.test_support.TestSupport.test_check__all__) ... ok
test_check_syntax_error (test.test_support.TestSupport.test_check_syntax_error) ... ok
test_copy_python_src_ignore (test.test_support.TestSupport.test_copy_python_src_ignore) ... skipped "cannot access Python source code directory: 'D:\\\\pypy_stuff\\\\buildbot64\\\\slave\\\\pypy-c-jit-win-x86-64\\\\build\\\\pypy\\\\goal\\\\Modules' landmark is missing"
test_detect_api_mismatch (test.test_support.TestSupport.test_detect_api_mismatch) ... ok
test_detect_api_mismatch__ignore (test.test_support.TestSupport.test_detect_api_mismatch__ignore) ... ok
test_fd_count (test.test_support.TestSupport.test_fd_count) ... ok
test_find_unused_port (test.test_support.TestSupport.test_find_unused_port) ... ok
test_forget (test.test_support.TestSupport.test_forget) ... ok
test_gc_collect (test.test_support.TestSupport.test_gc_collect) ... ok
test_get_attribute (test.test_support.TestSupport.test_get_attribute) ... ok
test_get_original_stdout (test.test_support.TestSupport.test_get_original_stdout) ... skipped 'failing buildbots'
test_get_recursion_depth (test.test_support.TestSupport.test_get_recursion_depth) ... FAIL
test_has_strftime_extensions (test.test_support.TestSupport.test_has_strftime_extensions) ... ok
test_ignored_deprecations_are_silent (test.test_support.TestSupport.test_ignored_deprecations_are_silent)
Test support.ignore_deprecations_from() silences warnings ... ok
test_import_fresh_module (test.test_support.TestSupport.test_import_fresh_module) ... ok
test_import_module (test.test_support.TestSupport.test_import_module) ... ok
test_make_bad_fd (test.test_support.TestSupport.test_make_bad_fd) ... ok
test_optim_args_from_interpreter_flags (test.test_support.TestSupport.test_optim_args_from_interpreter_flags) ... ok
test_parse_memlimit (test.test_support.TestSupport.test_parse_memlimit) ... ok
test_print_warning (test.test_support.TestSupport.test_print_warning) ... ok
test_python_is_optimized (test.test_support.TestSupport.test_python_is_optimized) ... ok
test_reap_children (test.test_support.TestSupport.test_reap_children) ... skipped 'need os.waitpid() and os.WNOHANG'
test_recursion (test.test_support.TestSupport.test_recursion) ... skipped 'not supported on PyPy'
test_rmtree (test.test_support.TestSupport.test_rmtree) ... ok
test_set_memlimit (test.test_support.TestSupport.test_set_memlimit) ... ok
test_sortdict (test.test_support.TestSupport.test_sortdict) ... ok
test_swap_attr (test.test_support.TestSupport.test_swap_attr) ... ok
test_swap_item (test.test_support.TestSupport.test_swap_item) ... ok
test_temp_cwd (test.test_support.TestSupport.test_temp_cwd) ... ok
test_temp_cwd__name_none (test.test_support.TestSupport.test_temp_cwd__name_none)
Test passing None to temp_cwd(). ... ok
test_temp_dir (test.test_support.TestSupport.test_temp_dir)
Test that temp_dir() creates and destroys its directory. ... ok
test_temp_dir__existing_dir__quiet_default (test.test_support.TestSupport.test_temp_dir__existing_dir__quiet_default)
Test passing a directory that already exists. ... ok
test_temp_dir__existing_dir__quiet_true (test.test_support.TestSupport.test_temp_dir__existing_dir__quiet_true)
Test passing a directory that already exists with quiet=True. ... ok
test_temp_dir__forked_child (test.test_support.TestSupport.test_temp_dir__forked_child)
Test that a forked child process does not remove the directory. ... skipped 'requires working os.fork()'
test_temp_dir__path_none (test.test_support.TestSupport.test_temp_dir__path_none)
Test passing no path. ... ok
test_unlink (test.test_support.TestSupport.test_unlink) ... ok
test_unload (test.test_support.TestSupport.test_unload) ... ok

======================================================================
FAIL: test_get_recursion_depth (test.test_support.TestSupport.test_get_recursion_depth)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "d:\pypy_stuff\buildbot64\slave\pypy-c-jit-win-x86-64\build\lib-python\3\test\test_support.py", line 639, in test_get_recursion_depth
    script_helper.assert_python_ok("-c", code)
                  ^^^^^^^^^^^^^^^^
  File "d:\pypy_stuff\buildbot64\slave\pypy-c-jit-win-x86-64\build\lib-python\3\test\support\script_helper.py", line 166, in assert_python_ok
    return _assert_python(True, *args, **env_vars)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "d:\pypy_stuff\buildbot64\slave\pypy-c-jit-win-x86-64\build\lib-python\3\test\support\script_helper.py", line 151, in _assert_python
    res.fail(cmd_line)
        ^^^^
  File "d:\pypy_stuff\buildbot64\slave\pypy-c-jit-win-x86-64\build\lib-python\3\test\support\script_helper.py", line 76, in fail
    raise AssertionError("Process return code is %d\n"
AssertionError: Process return code is 1
command line: ['d:\\pypy_stuff\\buildbot64\\slave\\pypy-c-jit-win-x86-64\\build\\pypy\\goal\\pypy3.11-c.exe', '-X', 'faulthandler', '-I', '-c', '\nfrom test import support\nimport sys\ntry:\n    from _testcapi import USE_STACKCHECK\nexcept ImportError:\n    USE_STACKCHECK = False\n\ndef check(cond):\n    if not cond:\n        raise AssertionError("test failed")\n\n# depth 1\ncheck(support.get_recursion_depth() == 1)\n\n# depth 2\ndef test_func():\n    check(support.get_recursion_depth() == 2)\ntest_func()\n\ndef test_recursive(depth, limit):\n    if depth >= limit:\n        # cannot call get_recursion_depth() at this depth,\n        # it can raise RecursionError\n        return\n    get_depth = support.get_recursion_depth()\n    print(f"test_recursive: {depth}/{limit}: "\n          f"get_recursion_depth() says {get_depth}")\n    check(get_depth == depth)\n    test_recursive(depth + 1, limit)\n\nif USE_STACKCHECK:\n    # f-string consumes 2 frames and -1 for USE_STACKCHECK\n    IGNORE = 3\nelse:\n    # f-string consumes 2 frames\n    IGNORE = 2\n\n# depth up to 25\nwith support.infinite_recursion(max_depth=25):\n    limit = sys.getrecursionlimit()\n    print(f"test with sys.getrecursionlimit()={limit}")\n    test_recursive(2, limit - IGNORE)\n\n# depth up to 500\nwith support.infinite_recursion(max_depth=500):\n    limit = sys.getrecursionlimit()\n    print(f"test with sys.getrecursionlimit()={limit}")\n    test_recursive(2, limit - IGNORE)\n']

stdout:
---
test with sys.getrecursionlimit()=26

test_recursive: 2/24: get_recursion_depth() says 2

test_recursive: 3/24: get_recursion_depth() says 3

test_recursive: 4/24: get_recursion_depth() says 4

test_recursive: 5/24: get_recursion_depth() says 5

test_recursive: 6/24: get_recursion_depth() says 6

test_recursive: 7/24: get_recursion_depth() says 7

test_recursive: 8/24: get_recursion_depth() says 8

test_recursive: 9/24: get_recursion_depth() says 9

test_recursive: 10/24: get_recursion_depth() says 10

test_recursive: 11/24: get_recursion_depth() says 11

test_recursive: 12/24: get_recursion_depth() says 12

test_recursive: 13/24: get_recursion_depth() says 13

test_recursive: 14/24: get_recursion_depth() says 14

test_recursive: 15/24: get_recursion_depth() says 15

test_recursive: 16/24: get_recursion_depth() says 16

test_recursive: 17/24: get_recursion_depth() says 17
---

stderr:
---
Traceback (most recent call last):

  File "<string>", line 43, in <module>

  File "<string>", line 30, in test_recursive

  File "<string>", line 30, in test_recursive

  File "<string>", line 30, in test_recursive

  [Previous line repeated 13 more times]

  File "<string>", line 27, in test_recursive

  File "d:\pypy_stuff\buildbot64\slave\pypy-c-jit-win-x86-64\build\lib-python\3\encodings\utf_8.py", line 20, in encode

    return codecs.utf_8_encode(input, self.errors)[0]

                  ^^^^^^^^^^^^

RecursionError: maximum recursion depth exceeded
---

----------------------------------------------------------------------
Ran 49 tests in 1.806s

FAILED (failures=1, skipped=6)
test_support failed (1 failure)

== Tests result: FAILURE ==

1 test failed:
    test_support

Total duration: 2.1 sec
Total tests: run=49 failures=1 skipped=6
Total test files: run=1/1 failed=1
Result: FAILURE
test test_support failed
builder: pypy-c-jit-win-x86-64 build #2423+
test: lib-python/3/test/test_support.py::unmodified