This commit is contained in:
Jesse Bannon 2024-01-19 00:24:02 -08:00
parent 0f37558a60
commit a4ad06bd89
2 changed files with 7 additions and 4 deletions

View file

@ -1,4 +1,5 @@
from typing import Optional, Dict from typing import Dict
from typing import Optional
from ytdl_sub.script.types.array import Array from ytdl_sub.script.types.array import Array
from ytdl_sub.script.types.map import Map from ytdl_sub.script.types.map import Map

View file

@ -140,11 +140,13 @@ class TestMapFunctions:
single_variable_output("{%map(1)}") single_variable_output("{%map(1)}")
def test_map_extend(self): def test_map_extend(self):
output = single_variable_output("""{ output = single_variable_output(
"""{
%map_extend( %map_extend(
{'key': 'value', 1: 3}, {'key': 'value', 1: 3},
{'key': 'override'} {'key': 'override'}
{'new': [1, 2]} {'new': [1, 2]}
) )
}""") }"""
assert output == {'key': 'override', 'new': [1, 2], 1: 3} )
assert output == {"key": "override", "new": [1, 2], 1: 3}