tests/test_block.py: test append after block

current
Síle Ekaterin Liszka 2024-01-19 13:00:59 -08:00
parent bfcdf0f020
commit 1b206081e6
Signed by: VulpineAmethyst
SSH Key Fingerprint: SHA256:VcHwQ6SUfi/p0Csfxe3SabX/TImWER0PhoJqkt+GlmE
1 changed files with 4 additions and 0 deletions

View File

@ -32,3 +32,7 @@ def test_assign_after_block():
'It is an error to assign to a block key after the block.'
with pytest.raises(ParseError):
loads_xbc('a { a = 1 }\na = 1')
def test_append_after_block():
'Modifying keys after a block is legal.'
loads_xbc('a\na { b = 1 }\na += 1') == {'a': '1', 'a.b': '1'}