25 Commits
Author SHA1 Message Date
youknowdot 0dca682e45 Update Python 3.15 test harness helpers and discovery (#9364)
Assisted-by: OpenAI Codex: model version unavailable
2026-10-25 15:14:33 +00:00
youknowdot 1ffba21557 Synchronize regression harness helpers with Python 3.15 (#9297)
Regenerate nine canonical modules using scripts/update_lib at CPython
3.15.0 d220409a13b77de7a6c30abe16ea90db01528edc. Keep the discovery
package split out until its missing test family is available.

AI-assisted source selection, synchronization, review and bounded
validation using OpenAI Codex. No native capability claims are added.

Assisted-by: Codex:unknown
2026-10-22 18:14:03 +09:00
youknowdot feca6f2004 Align collections and testing libraries with Python 3.15 (#9192)
* Align collections and testing libraries with Python 3.15

Refresh twelve production modules and canonical tests through scripts/update_lib at CPython d220409a13b77de7a6c30abe16ea90db01528edc. Preserve existing RustPython unittest helpers and test guards. Accept frozendict in native defaultdict and OrderedDict union slots, matching upstream PyAnyDict_Check without changing constructors, factories, or update order.

Validated as a local stack on the exact #9189 regex/dataclasses/typing prerequisite; this dependency avoids eager typing.ByteString deprecation during unittest warning tests.

Assisted-by: OpenAI Codex: model version unavailable

* Synchronize regression runner with doctest subtest reporting

Refresh the canonical test_regrtest consumer and its direct runner/pythoninfo closure through scripts/update_lib at CPython d220409a13b77de7a6c30abe16ea90db01528edc. Preserve both existing expected-failure markers. This aligns the runner test with doctest reporting two failed examples and one skipped example.

Assisted-by: OpenAI Codex: model version unavailable
2026-10-19 20:07:29 +09:00
Shahar Naveh 79c3575961 Update libregtest to 3.14.6 (#8100)
* Update `test_regrtest.py` to 3.14.6

* Update `libregrtest`

* Update unittest

* Unmark passing test

* Remove `test_set` from env polluters

* Revert "Unmark passing test"

This reverts commit 82b8c1c228.

* Revert "Remove `test_set` from env polluters"

This reverts commit 5a4040da32.

* Mark failing test
2026-06-15 11:19:01 +09:00
Jeong, YunWon 6a2af03c62 Fix signal handler after fork (#7012)
* temp regrtest save_env patch

* Refactor signal_handlers from Option to OnceCell

- Change `signal_handlers` type from `Option<Box<...>>` to
  `OnceCell<Box<...>>` so fork children can lazily initialize it
- Add `VirtualMachine::is_main_thread()` using runtime thread ID
  comparison instead of structural `signal_handlers.is_none()` check
- Initialize signal handlers in `py_os_after_fork_child()` via
  `get_or_init()` for workers that fork
- Use `get_or_init()` in `signal()` and `getsignal()` functions
- Remove `set_wakeup_fd(-1)` special-case workaround (d6d0303)
- Extract `signal::new_signal_handlers()` to deduplicate init expr
- Allow `getsignal()` from any thread (matches CPython behavior)
- Fix `set_wakeup_fd` error message to name the correct function
2026-02-10 00:38:46 +09:00
Jeong, YunWon 9e9bfa56c2 Update libregrtest from v3.14.2 2026-01-21 20:44:26 +09:00
Jeong, YunWon def6974bf6 fix threading._dangling 2026-01-10 22:10:35 -05:00
Padraic Fanning 59b80e30ed Save more of the test environment before a test is run 2026-01-10 22:10:35 -05:00
Padraic Fanning e4fb263788 Disable support.record_original_stdout() 2026-01-10 22:10:35 -05:00
Padraic Fanning a8e7633f58 Disable saved_test_environment context manager 2026-01-10 22:10:35 -05:00
Padraic Fanning f436c51ef2 Disable struct._clearcache() 2026-01-10 22:10:35 -05:00
Padraic Fanning 08762a35c2 Disable WindowsLoadTracker on Windows 2026-01-10 22:10:35 -05:00
Padraic Fanning 5d253d1ec0 Re-add try block around platform and encodings info 2026-01-10 22:10:35 -05:00
Padraic Fanning f297888317 Update test/libregrtest to CPython 3.13.10 2026-01-10 22:10:35 -05:00
Daniel Chiquito 5ee5531f32 Properly unload modules between tests (#5192)
There seems to have been a bug in the libregrtest code which unloaded
modules between tests. The previous state was calculated using
`sys.modules.keys()`, which is actually a mutable object that is updated
as the underlying `sys.modules` is updated. The result was that modules
were not unloaded between tests, which is the root cause for
`test_unittest` failing when run after `test_import` and
`test_importlib`.

This code is copied from 3.12. Ideally all of `libregrtest` should
probably be updated as it seems wildly out of date, but that's a lot
more work.
2024-03-21 21:51:57 +09:00
Alexander Scharinger 18fab32c0a Fix: parallel execution of python unit tests 2022-02-05 13:16:08 +01:00
Dean Li 6f98288e84 test: use import_helper 2021-11-29 21:03:02 +08:00
Dean Li 5ee4fb899b test: use os_helper 2021-11-28 20:51:32 +08:00
Jeong YunWon 913b78ca44 Revert "Merge pull request #3433 from deantvv/test-update"
This reverts commit 9fa5c5ac66, reversing
changes made to e7fa32c687.
2021-11-17 17:06:51 +09:00
Dean Li 49a5805d11 test: use os_helper 2021-11-13 02:18:33 +00:00
Jeong YunWon 8e8efe0ec8 reform every TODO: RUSTPYTHON to same format 2020-06-17 18:47:13 +09:00
Aviv Palivoda 1e8ea10278 Allow CPython tests to run on Mac 2020-02-08 11:45:35 +02:00
Aviv Palivoda 8baaa5d508 Enable platform.platform 2020-02-06 21:53:31 +02:00
Aviv Palivoda 4c7c5fd225 Change test code to allow running 2019-12-30 21:31:36 +02:00
Aviv Palivoda a157dc1230 Add regrtest from CPython 2019-12-30 21:31:36 +02:00