Skip to content

Tests: update test_codecmaps_{cn,hk,jp,kr,tw}, test_pstats, test_profile, test_cprofile, test_tracemalloc, test_multibytecodec from v3.14.5#7978

Open
JamesClarke7283 wants to merge 9 commits into
RustPython:mainfrom
JamesClarke7283:tests-10-modules-3.14.5
Open

Tests: update test_codecmaps_{cn,hk,jp,kr,tw}, test_pstats, test_profile, test_cprofile, test_tracemalloc, test_multibytecodec from v3.14.5#7978
JamesClarke7283 wants to merge 9 commits into
RustPython:mainfrom
JamesClarke7283:tests-10-modules-3.14.5

Conversation

@JamesClarke7283
Copy link
Copy Markdown
Contributor

@JamesClarke7283 JamesClarke7283 commented May 25, 2026

Summary

Refreshes 5 sparsely-marked codec-map tests and populates 5 previously-untracked test files using scripts/update_lib quick against CPython v3.14.5. Per the tracking inventory in #6839.

Refreshed (existed, sparsely @unittest.expectedFailure-marked):

  • test_codecmaps_cn
  • test_codecmaps_hk
  • test_codecmaps_jp
  • test_codecmaps_kr
  • test_codecmaps_tw

Newly populated (were untracked):

  • test_pstats (+ Lib/pstats.py, + Lib/test/pstats.pck fixture)
  • test_profile (+ Lib/profile.py)
  • test_cprofile (skipped at module level until _lsprof is implemented)
  • test_tracemalloc (+ Lib/tracemalloc.py, skipped until _tracemalloc is implemented)
  • test_multibytecodec (skipped until _multibytecodec is implemented)

Failures from missing C extensions (_lsprof, _tracemalloc, _multibytecodec) are guarded with module-level try/except ImportError raising unittest.SkipTest carrying # TODO: RUSTPYTHON per AGENTS.md. The codec-map suite preserves its existing per-method @unittest.expectedFailure # TODO: RUSTPYTHON; LookupError: unknown encoding: <X> markers — those unblock once _multibytecodec lands. No test bodies were modified.

Refs #6839

Test plan

  • All 10 test files run under cargo run --release -- -m test with no unexpected failures and no panics (7 OK + 3 skipped, 62 tests run, 3 skipped at module level)
  • cargo clippy --workspace --exclude rustpython-venvlauncher --exclude rustpython_wasm clean (5 pre-existing must_use warnings in rustpython-compiler-source)
  • cargo fmt --check clean
  • scripts/check_redundant_patches.py reports no orphan markers across all 10 files
  • test_inspect (downstream consumer of tracemalloc) still passes (362 tests)

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 25, 2026

Important

Review skipped

Review was skipped due to path filters

⛔ Files ignored due to path filters (9)
  • Lib/profile.py is excluded by !Lib/**
  • Lib/pstats.py is excluded by !Lib/**
  • Lib/test/pstats.pck is excluded by !Lib/**
  • Lib/test/test_cprofile.py is excluded by !Lib/**
  • Lib/test/test_multibytecodec.py is excluded by !Lib/**
  • Lib/test/test_profile.py is excluded by !Lib/**
  • Lib/test/test_pstats.py is excluded by !Lib/**
  • Lib/test/test_tracemalloc.py is excluded by !Lib/**
  • Lib/tracemalloc.py is excluded by !Lib/**

CodeRabbit blocks several paths by default. You can override this behavior by explicitly including those paths in the path filters. For example, including **/dist/** will override the default block on the dist directory, by removing the pattern from both the lists.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yml

Review profile: CHILL

Plan: Pro

Run ID: 74e3073f-c20e-4afc-8fe4-4fdeb89b96fe

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions
Copy link
Copy Markdown
Contributor

📦 Library Dependencies

The following Lib/ modules were modified. Here are their dependencies:

[x] lib: cpython/Lib/profile.py
[x] test: cpython/Lib/test/test_profile.py (TODO: 1)
[ ] test: cpython/Lib/test/test_cprofile.py (TODO: 1)

dependencies:

  • profile

dependent tests: (1 tests)

  • profile: test_profile

[x] lib: cpython/Lib/pstats.py
[ ] test: cpython/Lib/test/test_pstats.py (TODO: 2)

dependencies:

  • pstats

dependent tests: (2 tests)

  • pstats: test_profile test_pstats

[x] lib: cpython/Lib/codecs.py
[x] test: cpython/Lib/test/test_charmapcodec.py
[ ] test: cpython/Lib/test/test_codeccallbacks.py (TODO: 9)
[x] test: cpython/Lib/test/test_codecencodings_cn.py (TODO: 4)
[x] test: cpython/Lib/test/test_codecencodings_hk.py (TODO: 1)
[x] test: cpython/Lib/test/test_codecencodings_iso2022.py (TODO: 5)
[x] test: cpython/Lib/test/test_codecencodings_jp.py (TODO: 7)
[x] test: cpython/Lib/test/test_codecencodings_kr.py (TODO: 3)
[x] test: cpython/Lib/test/test_codecencodings_tw.py (TODO: 1)
[ ] test: cpython/Lib/test/test_codecmaps_cn.py (TODO: 3)
[ ] test: cpython/Lib/test/test_codecmaps_hk.py (TODO: 1)
[ ] test: cpython/Lib/test/test_codecmaps_jp.py (TODO: 6)
[ ] test: cpython/Lib/test/test_codecmaps_kr.py (TODO: 3)
[ ] test: cpython/Lib/test/test_codecmaps_tw.py (TODO: 3)
[ ] test: cpython/Lib/test/test_codecs.py (TODO: 12)
[ ] test: cpython/Lib/test/test_multibytecodec.py (TODO: 1)
[x] test: cpython/Lib/test/testcodec.py

dependencies:

  • codecs

dependent tests: (157 tests)

  • codecs: test_charmapcodec test_codeccallbacks test_codecs test_eof test_exceptions test_importlib test_inspect test_io test_json test_locale test_logging test_multibytecodec test_os test_plistlib test_sax test_str test_sys
    • encodings: test_pydoc
      • locale: test__locale test_builtin test_c_locale_coercion test_calendar test_decimal test_float test_format test_re test_regrtest test_strftime test_strptime test_types test_utf8_mode
    • json: test_subprocess test_sysconfig test_tomllib test_tools test_traceback test_zoneinfo
      • importlib.metadata: test_importlib
      • multiprocessing.resource_tracker: test_concurrent_futures
    • pickle: test_annotationlib test_argparse test_array test_ast test_asyncio test_bool test_bytes test_bz2 test_collections test_concurrent_futures test_configparser test_coroutines test_csv test_ctypes test_defaultdict test_deque test_descr test_dict test_dictviews test_email test_enum test_enumerate test_fractions test_functools test_generators test_genericalias test_http_cookies test_ipaddress test_iter test_itertools test_list test_lzma test_memoryio test_memoryview test_minidom test_opcache test_operator test_ordered_dict test_pathlib test_pickle test_picklebuffer test_pickletools test_platform test_positional_only_arg test_posix test_random test_range test_set test_shelve test_slice test_socket test_statistics test_string test_structseq test_time test_trace test_tuple test_type_aliases test_type_params test_typing test_unittest test_uuid test_xml_dom_minicompat test_xml_etree test_xpickle test_zipfile test_zlib test_zoneinfo
      • tracemalloc: test_tracemalloc
    • plistlib:
      • platform: test__osx_support test_android test_asyncio test_baseexception test_cmath test_ctypes test_fcntl test_math test_mimetypes test_shutil test_ssl test_winreg test_wsgiref
    • tokenize: test_linecache test_peg_generator test_tabnanny test_tokenize test_unparse
      • inspect: test_abc test_asyncgen test_buffer test_clinic test_code test_grammar test_monitoring test_ntpath test_patma test_posixpath test_signal test_sqlite3 test_type_annotations test_yield_from test_zipimport test_zipimport_support
      • linecache: test_bdb
      • traceback: test_asyncio test_code_module test_contextlib test_contextlib_async test_dictcomps test_http_cookiejar test_importlib test_listcomps test_pyexpat test_setcomps test_threadedtempfile test_threading test_unittest test_with

[x] lib: cpython/Lib/tracemalloc.py
[ ] test: cpython/Lib/test/test_tracemalloc.py (TODO: 1)

dependencies:

  • tracemalloc

dependent tests: (2 tests)

  • tracemalloc: test_inspect test_tracemalloc

Legend:

  • [+] path exists in CPython
  • [x] up-to-date, [ ] outdated

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant