forked from Rust-related/RustPython
Add TODO for spec validation
This commit is contained in:
@@ -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