summaryrefslogtreecommitdiffstats
path: root/test/test_formatter.py
diff options
context:
space:
mode:
Diffstat (limited to 'test/test_formatter.py')
-rw-r--r--test/test_formatter.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/test/test_formatter.py b/test/test_formatter.py
index e00af85..75324fb 100644
--- a/test/test_formatter.py
+++ b/test/test_formatter.py
@@ -25,6 +25,7 @@ class TestFormatter(unittest.TestCase):
"b": "äöü",
"j": "げんそうきょう",
"d": {"a": "foo", "b": 0, "c": None},
+ "i": 2,
"l": ["a", "b", "c"],
"n": None,
"s": " \n\r\tSPACE ",
@@ -267,6 +268,11 @@ class TestFormatter(unittest.TestCase):
"{a:Sort-reverse}", # starts with 'S', contains 'r'
"['w', 'r', 'o', 'l', 'h', 'd', 'O', 'L', 'L', 'E', ' ']")
+ def test_specifier_arithmetic(self):
+ self._run_test("{i:A+1}", "3")
+ self._run_test("{i:A-1}", "1")
+ self._run_test("{i:A*3}", "6")
+
def test_specifier_conversions(self):
self._run_test("{a:Cl}" , "hello world")
self._run_test("{h:CHC}" , "Foo & Bar")