summaryrefslogtreecommitdiff
path: root/tests/basics/string_format.py
diff options
context:
space:
mode:
authorDamien George <damien.p.george@gmail.com>2015-03-14 21:20:58 +0000
committerDamien George <damien.p.george@gmail.com>2015-03-14 21:20:58 +0000
commit26a9975fba2bbd8875f2671495003b9bdcb8d8b2 (patch)
tree6ea4e71ed0dde88d41ab29742c740faf6ee615e6 /tests/basics/string_format.py
parent0683c1ceefe328399d967b85f172544eef04a832 (diff)
tests: Add some more tests for bytes, bignum, string and ujson.
Diffstat (limited to 'tests/basics/string_format.py')
-rw-r--r--tests/basics/string_format.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/tests/basics/string_format.py b/tests/basics/string_format.py
index 07071be5a..5398c6e23 100644
--- a/tests/basics/string_format.py
+++ b/tests/basics/string_format.py
@@ -6,6 +6,7 @@ full_tests = False
def test(fmt, *args):
print('{:8s}'.format(fmt) + '>' + fmt.format(*args) + '<')
+test("}}{{")
test("{}-{}", 1, [4, 5])
test("{0}-{1}", 1, [4, 5])
test("{1}-{0}", 1, [4, 5])
@@ -40,6 +41,7 @@ test("{:#4X}", 0)
test("{:<6s}", "ab")
test("{:>6s}", "ab")
test("{:^6s}", "ab")
+test("{:.1s}", "ab")
test("{: <6d}", 123)
test("{: <6d}", -123)