diff options
author | Eric Snow <ericsnowcurrently@gmail.com> | 2023-11-23 00:55:00 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-11-23 00:55:00 (GMT) |
commit | 9e56eedd018e1a4681789e634016cbb7699dcb8a (patch) | |
tree | 7322c153dc98c2b22070ae8372967b16d1685b6d /Lib/test/test_import | |
parent | 14e539f0977aaf2768c58f1dcbbbab5ad0205ec5 (diff) | |
download | cpython-9e56eedd018e1a4681789e634016cbb7699dcb8a.zip cpython-9e56eedd018e1a4681789e634016cbb7699dcb8a.tar.gz cpython-9e56eedd018e1a4681789e634016cbb7699dcb8a.tar.bz2 |
gh-76785: Return an "excinfo" Object From Interpreter.run() (gh-111573)
Diffstat (limited to 'Lib/test/test_import')
-rw-r--r-- | Lib/test/test_import/__init__.py | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/Lib/test/test_import/__init__.py b/Lib/test/test_import/__init__.py index aa465c7..1ecac4f 100644 --- a/Lib/test/test_import/__init__.py +++ b/Lib/test/test_import/__init__.py @@ -1968,10 +1968,12 @@ class SubinterpImportTests(unittest.TestCase): print(_testsinglephase) ''') interpid = _interpreters.create() - with self.assertRaises(_interpreters.RunFailedError): - _interpreters.run_string(interpid, script) - with self.assertRaises(_interpreters.RunFailedError): - _interpreters.run_string(interpid, script) + + excsnap = _interpreters.run_string(interpid, script) + self.assertIsNot(excsnap, None) + + excsnap = _interpreters.run_string(interpid, script) + self.assertIsNot(excsnap, None) class TestSinglePhaseSnapshot(ModuleSnapshot): |