Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

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

Appearance settings

Commit eeb2fe4

Browse filesBrowse files
committed
TST: Ensure pytest assertion rewriting occurs in subprocesses
This means that: 1. assertion failures look a little better 2. assertions actually happen if optimization is enabled
1 parent c4a5bb7 commit eeb2fe4
Copy full SHA for eeb2fe4

File tree

1 file changed

+2
-0
lines changed
Filter options

1 file changed

+2
-0
lines changed

‎lib/matplotlib/testing/__init__.py

Copy file name to clipboardExpand all lines: lib/matplotlib/testing/__init__.py
+2Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,8 @@ def subprocess_run_helper(func, *args, timeout, extra_env=None):
129129
[
130130
sys.executable,
131131
"-c",
132+
f"import pytest;"
133+
f"pytest.register_assert_rewrite({module!r});"
132134
f"import importlib.util;"
133135
f"_spec = importlib.util.spec_from_file_location({module!r}, {file!r});"
134136
f"_module = importlib.util.module_from_spec(_spec);"

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.