Skip to content

Commit

Permalink
fix test_discover_test_with_broken_import under python 3.11+
Browse files Browse the repository at this point in the history
  • Loading branch information
benbariteau committed Oct 3, 2023
1 parent 2d1935d commit ce21bb0
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions test/discovery_failure_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,10 @@ def test_discover_test_with_broken_import(self):
r' Traceback \(most recent call last\):\n'
r' File "[^"]+", line \d+, in discover\n'
r' submod = __import__\(module_name, fromlist=\[str\(\'__trash\'\)\]\)\n'
r'( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n)?'
r' File "[^"]+", line \d+, in <module>\n'
r' import non_existent_module \# noqa: F401\n'
r'( ^^^^^^^^^^^^^^^^^^^^^^^^^^\n)?'
r' (ModuleNotFoundError|ImportError): No module named \'?non_existent_module\'?\n'
),
)
Expand Down

0 comments on commit ce21bb0

Please sign in to comment.