summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorMark Dickinson <dickinsm@gmail.com>2013-08-05 09:30:14 (GMT)
committerMark Dickinson <dickinsm@gmail.com>2013-08-05 09:30:14 (GMT)
commita9e626f704533207fc34d9c7aff12b54050c013b (patch)
tree9e579337f3d65ec00c9c470a617ed759e3ef0d67 /Lib
parentb2aa6f40559da92085e77a247b8756d860171a12 (diff)
downloadcpython-a9e626f704533207fc34d9c7aff12b54050c013b.zip
cpython-a9e626f704533207fc34d9c7aff12b54050c013b.tar.gz
cpython-a9e626f704533207fc34d9c7aff12b54050c013b.tar.bz2
Issue #18659: fix test_format test that wasn't being executed. Thanks Vajrasky Kok for the patch.
Diffstat (limited to 'Lib')
-rw-r--r--Lib/test/test_format.py10
1 files changed, 3 insertions, 7 deletions
diff --git a/Lib/test/test_format.py b/Lib/test/test_format.py
index 9f7630c..8a9c9c0 100644
--- a/Lib/test/test_format.py
+++ b/Lib/test/test_format.py
@@ -327,10 +327,6 @@ class FormatTest(unittest.TestCase):
self.assertIs(text % (), text)
self.assertIs(text.format(), text)
-
-def test_main():
- support.run_unittest(FormatTest)
-
def test_precision(self):
INT_MAX = 2147483647
@@ -342,10 +338,10 @@ def test_main():
self.assertEqual(str(cm.exception), "precision too big")
c = complex(f)
- self.assertEqual(format(f, ".0f"), "1")
- self.assertEqual(format(f, ".3f"), "1.200")
+ self.assertEqual(format(c, ".0f"), "1+0j")
+ self.assertEqual(format(c, ".3f"), "1.200+0.000j")
with self.assertRaises(ValueError) as cm:
- format(f, ".%sf" % (INT_MAX + 1))
+ format(c, ".%sf" % (INT_MAX + 1))
self.assertEqual(str(cm.exception), "precision too big")