Skip to content

Commit

Permalink
More code cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
scoder authored Feb 15, 2025
1 parent e46495d commit 9744829
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions lupa/tests/test.py
Original file line number Diff line number Diff line change
Expand Up @@ -161,13 +161,12 @@ def test_eval_error_cleanup(self):
def test_eval_error_message_decoding(self):
try:
self.lua.eval('require "UNKNOWNöMODULEäNAME"')
except self.lupa.LuaError:
error = str(sys.exc_info()[1])
except self.lupa.LuaError as exc:
error = str(exc)
else:
self.fail('expected error not raised')
expected_message = 'module \'UNKNOWNöMODULEäNAME\' not found'
self.assertTrue(expected_message in error,
'"%s" not found in "%s"' % (expected_message, error))
self.assertIn(expected_message, error)

def test_execute(self):
self.assertEqual(2, self.lua.execute('return 1+1'))
Expand Down

0 comments on commit 9744829

Please sign in to comment.