Commit Graph
5 Commits
Author SHA1 Message Date
Leesoo Ahn 729fdab88e interpreter: canonicalize when initializing search paths dynamically (#8299)
Dual-Root Mismatch in RustPython:
Unlike CPython, RustPython manages the standard library
in two separate locations in the workspace:
 - Workspace 'Lib/': Contains the test suite ('Lib/test/...') and
   standard library files.
 - crates/pylib/Lib/: A helper directory used for packaging.
   'crates/pylib/Lib' is a symlink pointing to the real workspace '../../Lib/'.

Runtime Directory Discrepancy:
 - 'sys.path' contains 'crates/pylib/Lib' (the path to the symlink).
 - Thus, when 'test.support' is imported, its '__file__' is resolved relative
   to the symlink: '/opt/RustPython/crates/pylib/Lib/test/support/__init__.py'.
 - Consequently, 'STDLIB_DIR' resolves to the symlink root:
   '/opt/RustPython/crates/pylib/Lib'.
 - However, since 'test_program.py' is executed directly from the workspace,
   its 'pkg_dir' is: '/opt/RustPython/Lib/test/test_unittest/testmock'.
 - When 'os.path.relpath(pkg_dir, top_dir)' is called:
   ---
   os.path.relpath(
       "/opt/RustPython/Lib/test/test_unittest/testmock",
       "/opt/RustPython/crates/pylib/Lib"
   )
   # Result: "../../../Lib/test/test_unittest/testmock"
   ---
   Because the relative path starts with '..', the assertion fails.

Assisted-by: Gemini
2026-07-19 13:32:46 +09:00
Shahar Naveh 9ef3d5776d Update unittest to 3.14.4 (#7752)
* Update `unittest` from 3.14.4

* Update `test_unittest` to 3.14.4

* Unmark passing test
2026-05-01 11:06:24 +00:00
CPython Devleopers dfed341ec8 Upgrade unittest from 3.14.2 2026-01-18 19:56:54 +09:00
Terry Tianlin Luan 4bec6bb6f9 Updated the pkgutil + unittest libraries + the pkgutil, unittest and import tests - v.3.13.11 (#6610)
* Updated unittest + tests

* Updated pkgutil + the associated test

* Updated test_import

* Fixed import + unittest test errors

* Updated test_dll_dependency_import with expectedFailure
2026-01-04 09:54:01 +09:00
Shahar Naveh f32a5b105a Update unittest partially (#6051)
* Update `test_unittest` from 3.13.5

* Remove old `test_unittest.py`
2025-07-31 10:53:39 +09:00