Skip to content

Commit 5fc3c37

Browse files
committed
[GR-74513] Limit missing codec regression to GraalPy semantics
1 parent 08384ba commit 5fc3c37

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

graalpython/com.oracle.graal.python.test/src/tests/test_codecs.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -894,10 +894,11 @@ def test_encode_dict_err_xmlcharrefreplace(self):
894894
class MultibyteCodecTest(unittest.TestCase):
895895

896896
def test_missing_multibyte_codecs_raise_import_error(self):
897+
expected_exc = ImportError if sys.implementation.name == 'graalpy' else LookupError
897898
for module_name in ('_codecs_cn', '_codecs_hk', '_codecs_iso2022', '_codecs_jp', '_codecs_kr', '_codecs_tw'):
898899
with self.subTest(module_name=module_name):
899900
module = importlib.import_module(module_name)
900-
self.assertRaises(ImportError, module.getcodec, '__missing_codec__')
901+
self.assertRaises(expected_exc, module.getcodec, '__missing_codec__')
901902

902903
# just a smoke test
903904
def test_encode(self):

0 commit comments

Comments
 (0)