Commit 33e71e01 authored by Marcel Plch's avatar Marcel Plch Committed by Petr Viktorin

bpo-31862: Port binascii to PEP 489 multiphase initialization (GH-4108)

parent 77aa396b
......@@ -473,6 +473,19 @@ class SubinterpreterTest(unittest.TestCase):
self.assertNotEqual(pickle.load(f), id(sys.modules))
self.assertNotEqual(pickle.load(f), id(builtins))
def test_mutate_exception(self):
"""
Exceptions saved in global module state get shared between
individual module instances. This test checks whether or not
a change in one interpreter's module gets reflected into the
other ones.
"""
import binascii
support.run_in_subinterp("import binascii; binascii.Error.foobar = 'foobar'")
self.assertFalse(hasattr(binascii.Error, "foobar"))
class TestThreadState(unittest.TestCase):
......
Port binascii to PEP 489 multiphase initialization.
Patch by Marcel Plch.
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment