From aa65a0732af265b6482fc93885cc8bb3a87cad93 Mon Sep 17 00:00:00 2001 From: Ben Bariteau Date: Tue, 3 Oct 2023 13:08:41 -0700 Subject: [PATCH] fix test_discover_test_with_broken_import under python 3.11+ --- test/discovery_failure_test.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/test/discovery_failure_test.py b/test/discovery_failure_test.py index 638c881..a365c04 100644 --- a/test/discovery_failure_test.py +++ b/test/discovery_failure_test.py @@ -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 \n' r' import non_existent_module \# noqa: F401\n' + r'( \^\^\^\^\^\^\^\^\^\^\^\^\^\^\^\^\^\^\^\^\^\^\^\^\^\^\n|)' r' (ModuleNotFoundError|ImportError): No module named \'?non_existent_module\'?\n' ), )