Skip to content

Commit 729aeff

Browse files
committed
Move tests to extra_tests.
1 parent 057d745 commit 729aeff

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

extra_tests/snippets/strings.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -227,6 +227,11 @@ def __repr__(self):
227227
assert "%f" % (1.23456789012) == "1.234568"
228228
assert "%f" % (123) == "123.000000"
229229
assert "%f" % (-123) == "-123.000000"
230+
assert "%e" % 1 == '1.000000e+00'
231+
assert "%e" % 0 == '0.000000e+00'
232+
assert "%e" % 0.1 == '1.000000e-01'
233+
assert "%e" % 10 == '1.000000e+01'
234+
assert "%.10e" % 1.2345678901234567890 == '1.2345678901e+00'
230235

231236
assert_raises(TypeError, lambda: "My name is %s and I'm %(age)d years old" % ("Foo", 25), _msg='format requires a mapping')
232237
assert_raises(TypeError, lambda: "My name is %(name)s" % "Foo", _msg='format requires a mapping')

0 commit comments

Comments
 (0)