summaryrefslogtreecommitdiff
path: root/sys/lib/python/test/test_call.py
diff options
context:
space:
mode:
authorcinap_lenrek <cinap_lenrek@localhost>2011-05-04 05:41:33 +0000
committercinap_lenrek <cinap_lenrek@localhost>2011-05-04 05:41:33 +0000
commitb8436b026a90291ba26afa4f7a2700720b03339f (patch)
tree3098aede87640c80567ecb31022e0404a8b5ec75 /sys/lib/python/test/test_call.py
parent6c1b42188259a6f1636cd15a9570b18af03e2dbb (diff)
remove python test cases
Diffstat (limited to 'sys/lib/python/test/test_call.py')
-rw-r--r--sys/lib/python/test/test_call.py131
1 files changed, 0 insertions, 131 deletions
diff --git a/sys/lib/python/test/test_call.py b/sys/lib/python/test/test_call.py
deleted file mode 100644
index f3c7c8c39..000000000
--- a/sys/lib/python/test/test_call.py
+++ /dev/null
@@ -1,131 +0,0 @@
-import unittest
-from test import test_support
-
-# The test cases here cover several paths through the function calling
-# code. They depend on the METH_XXX flag that is used to define a C
-# function, which can't be verified from Python. If the METH_XXX decl
-# for a C function changes, these tests may not cover the right paths.
-
-class CFunctionCalls(unittest.TestCase):
-
- def test_varargs0(self):
- self.assertRaises(TypeError, {}.has_key)
-
- def test_varargs1(self):
- {}.has_key(0)
-
- def test_varargs2(self):
- self.assertRaises(TypeError, {}.has_key, 0, 1)
-
- def test_varargs0_ext(self):
- try:
- {}.has_key(*())
- except TypeError:
- pass
-
- def test_varargs1_ext(self):
- {}.has_key(*(0,))
-
- def test_varargs2_ext(self):
- try:
- {}.has_key(*(1, 2))
- except TypeError:
- pass
- else:
- raise RuntimeError
-
- def test_varargs0_kw(self):
- self.assertRaises(TypeError, {}.has_key, x=2)
-
- def test_varargs1_kw(self):
- self.assertRaises(TypeError, {}.has_key, x=2)
-
- def test_varargs2_kw(self):
- self.assertRaises(TypeError, {}.has_key, x=2, y=2)
-
- def test_oldargs0_0(self):
- {}.keys()
-
- def test_oldargs0_1(self):
- self.assertRaises(TypeError, {}.keys, 0)
-
- def test_oldargs0_2(self):
- self.assertRaises(TypeError, {}.keys, 0, 1)
-
- def test_oldargs0_0_ext(self):
- {}.keys(*())
-
- def test_oldargs0_1_ext(self):
- try:
- {}.keys(*(0,))
- except TypeError:
- pass
- else:
- raise RuntimeError
-
- def test_oldargs0_2_ext(self):
- try:
- {}.keys(*(1, 2))
- except TypeError:
- pass
- else:
- raise RuntimeError
-
- def test_oldargs0_0_kw(self):
- try:
- {}.keys(x=2)
- except TypeError:
- pass
- else:
- raise RuntimeError
-
- def test_oldargs0_1_kw(self):
- self.assertRaises(TypeError, {}.keys, x=2)
-
- def test_oldargs0_2_kw(self):
- self.assertRaises(TypeError, {}.keys, x=2, y=2)
-
- def test_oldargs1_0(self):
- self.assertRaises(TypeError, [].count)
-
- def test_oldargs1_1(self):
- [].count(1)
-
- def test_oldargs1_2(self):
- self.assertRaises(TypeError, [].count, 1, 2)
-
- def test_oldargs1_0_ext(self):
- try:
- [].count(*())
- except TypeError:
- pass
- else:
- raise RuntimeError
-
- def test_oldargs1_1_ext(self):
- [].count(*(1,))
-
- def test_oldargs1_2_ext(self):
- try:
- [].count(*(1, 2))
- except TypeError:
- pass
- else:
- raise RuntimeError
-
- def test_oldargs1_0_kw(self):
- self.assertRaises(TypeError, [].count, x=2)
-
- def test_oldargs1_1_kw(self):
- self.assertRaises(TypeError, [].count, {}, x=2)
-
- def test_oldargs1_2_kw(self):
- self.assertRaises(TypeError, [].count, x=2, y=2)
-
-
-def test_main():
- test_support.run_unittest(CFunctionCalls)
-
-
-if __name__ == "__main__":
- test_main()