test_capi: make a specific test case for the subinterpreter test

(it was wrongly classified in the pending calls test case)
This commit is contained in:
Antoine Pitrou 2013-08-01 20:43:26 +02:00
parent f93c7b8061
commit 7a2572cb49
1 changed files with 6 additions and 1 deletions

View File

@ -193,6 +193,9 @@ class TestPendingCalls(unittest.TestCase):
self.pendingcalls_submit(l, n) self.pendingcalls_submit(l, n)
self.pendingcalls_wait(l, n) self.pendingcalls_wait(l, n)
class SubinterpreterTest(unittest.TestCase):
def test_subinterps(self): def test_subinterps(self):
import builtins import builtins
r, w = os.pipe() r, w = os.pipe()
@ -208,6 +211,7 @@ class TestPendingCalls(unittest.TestCase):
self.assertNotEqual(pickle.load(f), id(sys.modules)) self.assertNotEqual(pickle.load(f), id(sys.modules))
self.assertNotEqual(pickle.load(f), id(builtins)) self.assertNotEqual(pickle.load(f), id(builtins))
# Bug #6012 # Bug #6012
class Test6012(unittest.TestCase): class Test6012(unittest.TestCase):
def test(self): def test(self):
@ -354,7 +358,8 @@ class TestThreadState(unittest.TestCase):
def test_main(): def test_main():
support.run_unittest(CAPITest, TestPendingCalls, Test6012, support.run_unittest(CAPITest, TestPendingCalls, Test6012,
EmbeddingTest, SkipitemTest, TestThreadState) EmbeddingTest, SkipitemTest, TestThreadState,
SubinterpreterTest)
for name in dir(_testcapi): for name in dir(_testcapi):
if name.startswith('test_'): if name.startswith('test_'):