From bbb931bebd9237183ee8bb0b5e90cf2ecb3fd046 Mon Sep 17 00:00:00 2001 From: Guido van Rossum Date: Fri, 18 Apr 2003 00:13:53 +0000 Subject: Delete the 'h' test -- 'h' is no longer unsigned so the machinery here can't test it. It's unchanged so why would we test it anyway... --- Lib/test/test_getargs2.py | 17 +---------------- 1 file changed, 1 insertion(+), 16 deletions(-) diff --git a/Lib/test/test_getargs2.py b/Lib/test/test_getargs2.py index 4cf876a..53ad20c 100644 --- a/Lib/test/test_getargs2.py +++ b/Lib/test/test_getargs2.py @@ -12,7 +12,7 @@ warnings.filterwarnings("ignore", category=DeprecationWarning, module=__name__) > Code C type Range check > > b unsigned char 0..UCHAR_MAX -> h unsigned short 0..USHRT_MAX +> h signed short SHRT_MIN..SHRT_MAX > B unsigned char none ** > H unsigned short none ** > k * unsigned long none @@ -80,21 +80,6 @@ class Unsigned_TestCase(unittest.TestCase): self.failUnlessEqual(42, ul_convert("b", 42L)) self.assertRaises(OverflowError, ul_convert, "b", VERY_LARGE) - def test_h(self): - # h returns 'unsigned short', and does range checking (0 ... USHRT_MAX) - self.failUnlessEqual(3, ul_convert("h", 3.14)) - self.failUnlessEqual(99, ul_convert("h", Long())) - self.failUnlessEqual(99, ul_convert("h", Int())) - - self.assertRaises(OverflowError, ul_convert, "h", -1) - self.failUnlessEqual(0, ul_convert("h", 0)) - self.failUnlessEqual(USHRT_MAX, ul_convert("h", USHRT_MAX)) - self.assertRaises(OverflowError, ul_convert, "h", USHRT_MAX+1) - - self.failUnlessEqual(42, ul_convert("h", 42)) - self.failUnlessEqual(42, ul_convert("h", 42L)) - self.assertRaises(OverflowError, ul_convert, "h", VERY_LARGE) - def test_B(self): # B returns 'unsigned char', no range checking self.failUnless(3 == ul_convert("B", 3.14)) -- cgit v0.12