diff options
author | Guido van Rossum <guido@python.org> | 2007-01-15 16:59:06 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 2007-01-15 16:59:06 (GMT) |
commit | e2a383d062434c05b73031f0da57fe82b9da8942 (patch) | |
tree | 1a6fb6b2c056a10ee227dbc75855b3fac6153414 /Lib/test/test_optparse.py | |
parent | fc7bb8c786fd9cb3b1ab84e1976620d0ab545777 (diff) | |
download | cpython-e2a383d062434c05b73031f0da57fe82b9da8942.zip cpython-e2a383d062434c05b73031f0da57fe82b9da8942.tar.gz cpython-e2a383d062434c05b73031f0da57fe82b9da8942.tar.bz2 |
Rip out 'long' and 'L'-suffixed integer literals.
(Rough first cut.)
Diffstat (limited to 'Lib/test/test_optparse.py')
-rw-r--r-- | Lib/test/test_optparse.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/Lib/test/test_optparse.py b/Lib/test/test_optparse.py index e05fbc6..6ec2902 100644 --- a/Lib/test/test_optparse.py +++ b/Lib/test/test_optparse.py @@ -1598,7 +1598,7 @@ class TestParseNumber(BaseTest): def setUp(self): self.parser = InterceptingOptionParser() self.parser.add_option("-n", type=int) - self.parser.add_option("-l", type=long) + self.parser.add_option("-l", type=int) def test_parse_num_fail(self): self.assertRaises( @@ -1606,17 +1606,17 @@ class TestParseNumber(BaseTest): ValueError, re.compile(r"invalid literal for int().*: '?'?")) self.assertRaises( - _parse_num, ("0xOoops", long), {}, + _parse_num, ("0xOoops", int), {}, ValueError, re.compile(r"invalid literal for int().*: '?0xOoops'?")) def test_parse_num_ok(self): self.assertEqual(_parse_num("0", int), 0) self.assertEqual(_parse_num("0x10", int), 16) - self.assertEqual(_parse_num("0XA", long), 10L) - self.assertEqual(_parse_num("010", long), 8L) + self.assertEqual(_parse_num("0XA", int), 10) + self.assertEqual(_parse_num("010", int), 8) self.assertEqual(_parse_num("0b11", int), 3) - self.assertEqual(_parse_num("0b", long), 0L) + self.assertEqual(_parse_num("0b", int), 0) def test_numeric_options(self): self.assertParseOK(["-n", "42", "-l", "0x20"], |