Skip to content

Commit

Permalink
Fix a typo in the name of UndefinedVarException (hedyorg#904)
Browse files Browse the repository at this point in the history
  • Loading branch information
bjorn3 authored Oct 7, 2021
1 parent 90bf2b4 commit 7200fa5
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions hedy.py
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ def __init__(self, level, location, keyword_found=None, character_found=None):
self.keyword_found = keyword_found
self.character_found = character_found

class UnderfinedVarException(HedyException):
class UndefinedVarException(HedyException):
def __init__(self, **arguments):
super().__init__('Var Undefined', **arguments)

Expand Down Expand Up @@ -681,7 +681,7 @@ def print(self, args):
return make_f_string(args, self.lookup)
else:
first_unquoted_var = unquoted_args[0]
raise UnderfinedVarException(name=first_unquoted_var)
raise UndefinedVarException(name=first_unquoted_var)

def print_nq(self, args):
return ConvertToPython_2.print(self, args)
Expand Down
6 changes: 3 additions & 3 deletions tests/tests_level_03.py
Original file line number Diff line number Diff line change
Expand Up @@ -278,10 +278,10 @@ def test_transpile_missing_all_quotes(self):

code = textwrap.dedent("""\
print hallo wereld""")

for level in range(self.level, max_level+1):

with self.assertRaises(hedy.UnderfinedVarException) as context:
with self.assertRaises(hedy.UndefinedVarException) as context:
result = hedy.transpile(code, level)

self.assertEqual('Var Undefined', context.exception.error_code)
Expand All @@ -294,7 +294,7 @@ def test_var_undefined_error_message(self):
naam is Hedy
print 'ik heet ' name""")

with self.assertRaises(hedy.UnderfinedVarException) as context:
with self.assertRaises(hedy.UndefinedVarException) as context:
result = hedy.transpile(code, self.level)

self.assertEqual('Var Undefined', context.exception.error_code)
Expand Down

0 comments on commit 7200fa5

Please sign in to comment.