Skip to content

refactor: move some tests inside the lib - #6311

Open
davidhewitt wants to merge 3 commits into
PyO3:mainfrom
davidhewitt:move-tests
Open

refactor: move some tests inside the lib#6311
davidhewitt wants to merge 3 commits into
PyO3:mainfrom
davidhewitt:move-tests

Conversation

@davidhewitt

@davidhewitt davidhewitt commented Aug 8, 2026

Copy link
Copy Markdown
Member

This is a cleanup of various freestanding test files as a slight declutter of the codebase:

  • Inline the following unit-test-like suites:

    • test_datetime.rs into src/types/datetime.rs
    • test_serde.rs into src/conversions/serde.rs
    • test_string.rs into src/conversions/std/string.rs (rewriting the one test to not need a #[pyfunction])
  • Remove the following test suites:

    • test_anyhow.rs (unit tests already exist, testing a PyErr return from #[pyfunction] seems orthogonal to the feature)
    • test_bytes.rs (preserve one unit test for Py::as_bytes in src/conversions/bytes.rs

(I'm hoping that if I do a bit of this test suite decluttering every now and again we can have CI running more efficiently...)

Also fixes #5344 at the same time.

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.

chrono-tz tests fail

1 participant