summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_getargs2.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/test/test_getargs2.py')
-rw-r--r--Lib/test/test_getargs2.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/Lib/test/test_getargs2.py b/Lib/test/test_getargs2.py
index 1918386..d8f6309 100644
--- a/Lib/test/test_getargs2.py
+++ b/Lib/test/test_getargs2.py
@@ -63,6 +63,10 @@ class Int:
def __int__(self):
return 99
+class InvalidLongAsString:
+ def __int__(self):
+ return 'foobar'
+
class Unsigned_TestCase(unittest.TestCase):
def test_b(self):
from _testcapi import getargs_b
@@ -199,6 +203,7 @@ class Signed_TestCase(unittest.TestCase):
self.failUnlessEqual(42, getargs_n(42))
self.assertRaises(OverflowError, getargs_n, VERY_LARGE)
+ self.assertRaises(TypeError, getargs_n, InvalidLongAsString())
class LongLong_TestCase(unittest.TestCase):
def test_L(self):