[formatter] add 'g' conversion to sluGify a string (#2410)

This commit is contained in:
Mike Fährmann
2022-08-23 21:14:55 +02:00
parent e4cff67aaa
commit 67bad04dda
5 changed files with 36 additions and 1 deletions

View File

@@ -58,6 +58,7 @@ class TestFormatter(unittest.TestCase):
self._run_test("{dt!T}", "1262304000")
self._run_test("{l!j}", '["a", "b", "c"]')
self._run_test("{dt!j}", '"2010-01-01 00:00:00"')
self._run_test("{a!g}", "hello-world")
with self.assertRaises(KeyError):
self._run_test("{a!q}", "hello world")