Ensure that the tests work even if BinaryFormatter is not available by filmor · Pull Request #2638 · pythonnet/pythonnet

Skip to content

Navigation Menu

Sign in

Appearance settings

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

Appearance settings

Conversation

@filmor

Copy link Copy Markdown

Member

@filmor filmor commented

Oct 21, 2025

edited

Loading

Summary

  • Run most tests in a single Python instance, initialized at start and shutdown at the end
  • Improve uv CI setup
  • Fix python test runner by essentially replacing it with a call to pytest.main
  • Improve the PythonDLL exception
  • Run tests that require reinitialization of the PythonEngine only on .NET Framework/Mono, where we still have a working formatter for the stashing

TODO:

  • Remove PythonEngine.Initialize() and .Shutdown() from all fixtures where it's not strictly necessary
  • Ensure that all fixtures reset the environment (e.g. by adjusting the base type providers and codecs back to the default)
  • Move the remaining fixtures into a separate project that runs all actual tests in individual processes (not needed, we can run those tests on Mono)
  • Reenable all disabled tests (all but the low-level ones)
  • Fix the domain reload tests (or ditch them)

@filmor filmor force-pushed the no-stashing-embedding-tests branch from ccca132 to bbd8582 Compare

October 22, 2025 19:38

@filmor filmor added this to the 3.1.0 milestone

Oct 22, 2025

@filmor filmor force-pushed the no-stashing-embedding-tests branch 4 times, most recently from e8e6f90 to 2bd1a64 Compare

October 26, 2025 18:02

@filmor filmor mentioned this pull request

Oct 31, 2025

3 tasks

@filmor filmor force-pushed the no-stashing-embedding-tests branch 6 times, most recently from 710d2e0 to baf36d2 Compare

December 8, 2025 09:57

@filmor filmor force-pushed the no-stashing-embedding-tests branch from baf36d2 to 01cacfb Compare

December 8, 2025 10:00

@filmor filmor force-pushed the no-stashing-embedding-tests branch from 01cacfb to 2f24a35 Compare

December 8, 2025 10:08

@filmor filmor marked this pull request as ready for review

December 8, 2025 10:14

@filmor filmor merged commit bd15f2d into master

Dec 8, 2025

22 checks passed

@filmor filmor deleted the no-stashing-embedding-tests branch

December 8, 2025 10:15

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

Reviewers

No reviews

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

3.1.0

Development

Successfully merging this pull request may close these issues.

1 participant

@filmor