aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/Lib/test/test_interpreters/test_api.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/test/test_interpreters/test_api.py')
-rw-r--r--Lib/test/test_interpreters/test_api.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/Lib/test/test_interpreters/test_api.py b/Lib/test/test_interpreters/test_api.py
index 0ee4582b5d1..a34b20beaca 100644
--- a/Lib/test/test_interpreters/test_api.py
+++ b/Lib/test/test_interpreters/test_api.py
@@ -412,9 +412,11 @@ class InterpreterObjectTests(TestBase):
def test_pickle(self):
interp = interpreters.create()
- data = pickle.dumps(interp)
- unpickled = pickle.loads(data)
- self.assertEqual(unpickled, interp)
+ for protocol in range(pickle.HIGHEST_PROTOCOL + 1):
+ with self.subTest(protocol=protocol):
+ data = pickle.dumps(interp, protocol)
+ unpickled = pickle.loads(data)
+ self.assertEqual(unpickled, interp)
class TestInterpreterIsRunning(TestBase):