diff options
author | Mark Dickinson <dickinsm@gmail.com> | 2013-08-05 09:59:36 (GMT) |
---|---|---|
committer | Mark Dickinson <dickinsm@gmail.com> | 2013-08-05 09:59:36 (GMT) |
commit | f3e4b62d02cc326abd7d9ec2637208e3401c7fc6 (patch) | |
tree | 515da7c5a74232209caaba85dedde4dce8c7ae36 | |
parent | a9e626f704533207fc34d9c7aff12b54050c013b (diff) | |
download | cpython-f3e4b62d02cc326abd7d9ec2637208e3401c7fc6.zip cpython-f3e4b62d02cc326abd7d9ec2637208e3401c7fc6.tar.gz cpython-f3e4b62d02cc326abd7d9ec2637208e3401c7fc6.tar.bz2 |
Issue #18659: Backed out changeset cfd875bcbe41 after buildbot failures.
-rw-r--r-- | Lib/test/test_format.py | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/Lib/test/test_format.py b/Lib/test/test_format.py index 8a9c9c0..9f7630c 100644 --- a/Lib/test/test_format.py +++ b/Lib/test/test_format.py @@ -327,6 +327,10 @@ 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 @@ -338,10 +342,10 @@ class FormatTest(unittest.TestCase): self.assertEqual(str(cm.exception), "precision too big") c = complex(f) - self.assertEqual(format(c, ".0f"), "1+0j") - self.assertEqual(format(c, ".3f"), "1.200+0.000j") + self.assertEqual(format(f, ".0f"), "1") + self.assertEqual(format(f, ".3f"), "1.200") with self.assertRaises(ValueError) as cm: - format(c, ".%sf" % (INT_MAX + 1)) + format(f, ".%sf" % (INT_MAX + 1)) self.assertEqual(str(cm.exception), "precision too big") |