mirror of
https://github.com/RustPython/RustPython.git
synced 2026-10-29 11:14:38 +08:00
Add TODO for spec validation
This commit is contained in:
1 parent
b394ad4e05
commit
6698fdee12
1 file changed
+5
@@ -1,3 +1,4 @@
|
||||
from testutils import assert_raises
|
||||
foo = 'bar'
|
||||
|
||||
assert f"{''}" == ''
|
||||
@@ -19,6 +20,10 @@ assert f"{{{(lambda x: f'hello, {x}')('world}')}" == '{hello, world}'
|
||||
spec = "0>+#10x"
|
||||
assert f"{16:{spec}}{foo}" == '00000+0x10bar'
|
||||
|
||||
# TODO:
|
||||
# spec = "bla"
|
||||
# assert_raises(ValueError, lambda: f"{16:{spec}}")
|
||||
|
||||
# Normally `!` cannot appear outside of delimiters in the expression but
|
||||
# cpython makes an exception for `!=`, so we should too.
|
||||
|
||||
|
||||
Reference in new issue
Block a user