Skip to content

Commit

Permalink
Correct the regex matching the printed error.
Browse files Browse the repository at this point in the history
  • Loading branch information
freakboy3742 committed Oct 25, 2024
1 parent 41ed908 commit 8111d82
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Lib/test/test_import/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -377,7 +377,7 @@ def test_from_import_missing_attr_has_name_and_so_path(self):
self.assertEqual(cm.exception.path, _testcapi.__spec__.origin)
self.assertRegex(
str(cm.exception),
r"cannot import name 'i_dont_exist' from '_testcapi' \(.*\.(so|pyd)?\)"
r"cannot import name 'i_dont_exist' from '_testcapi' \(.*(\.(so|pyd))?\)"
)
else:
self.assertEqual(
Expand Down

0 comments on commit 8111d82

Please sign in to comment.