Skip to content

Commit

Permalink
🤖 Automatically update generated files
Browse files Browse the repository at this point in the history
  • Loading branch information
boryanagoncharenko committed Aug 8, 2024
1 parent 6336b02 commit 4cf3d08
Showing 1 changed file with 0 additions and 32 deletions.
32 changes: 0 additions & 32 deletions tests/test_level/test_level_16.py
Original file line number Diff line number Diff line change
Expand Up @@ -683,38 +683,6 @@ def test_inequality_with_diff_types_gives_error(self, left, right):

self.single_level_tester(code, exception=exceptions.InvalidTypeCombinationException)

def test_color_with_list_variable_runtime_gives_error(self):
code = textwrap.dedent("""\
c = ['red', 'green', 'blue']
color c""")

expected = self.dedent(
"c = Value([Value('red'), Value('green'), Value('blue')])",
self.color_transpiled('{c}')
)

self.multi_level_tester(
code=code,
extra_check_function=lambda c: c.exception.arguments['line_number'] == 2,
expected=expected,
)

def test_color_with_list_access_random(self):
code = textwrap.dedent("""\
colors = ['red', 'green', 'blue']
color colors[random]""")

expected = self.dedent(
"colors = Value([Value('red'), Value('green'), Value('blue')])",
self.color_transpiled('{random.choice(colors.data)}')
)

self.multi_level_tester(
code=code,
expected=expected,
extra_check_function=self.is_turtle(),
)

#
# and/or commands
#
Expand Down

0 comments on commit 4cf3d08

Please sign in to comment.