(self)
| 1689 | |
| 1690 | @unittest.skipUnless(hasattr(os, "pipe"), "requires os.pipe()") |
| 1691 | def test_subinterps(self): |
| 1692 | import builtins |
| 1693 | r, w = os.pipe() |
| 1694 | code = """if 1: |
| 1695 | import sys, builtins, pickle |
| 1696 | with open({:d}, "wb") as f: |
| 1697 | pickle.dump(id(sys.modules), f) |
| 1698 | pickle.dump(id(builtins), f) |
| 1699 | """.format(w) |
| 1700 | with open(r, "rb") as f: |
| 1701 | ret = support.run_in_subinterp(code) |
| 1702 | self.assertEqual(ret, 0) |
| 1703 | self.assertNotEqual(pickle.load(f), id(sys.modules)) |
| 1704 | self.assertNotEqual(pickle.load(f), id(builtins)) |
| 1705 | |
| 1706 | @unittest.skipUnless(hasattr(os, "pipe"), "requires os.pipe()") |
| 1707 | def test_subinterps_recent_language_features(self): |
nothing calls this directly
no test coverage detected