Skip to content

Commit

Permalink
Simplify code
Browse files Browse the repository at this point in the history
  • Loading branch information
scoder authored Feb 15, 2025
1 parent 99286d0 commit e46495d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lupa/tests/test.py
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ def test_eval_error_message_decoding(self):
try:
self.lua.eval('require "UNKNOWNöMODULEäNAME"')
except self.lupa.LuaError:
error = '%s'.decode('ASCII') % sys.exc_info()[1]
error = str(sys.exc_info()[1])
else:
self.fail('expected error not raised')
expected_message = 'module \'UNKNOWNöMODULEäNAME\' not found'
Expand Down Expand Up @@ -2079,7 +2079,7 @@ def mandelbrot(i, lua_func):
# plausability checks - make sure it's not all white or all black
self.assertEqual('\0'.encode('ASCII')*(image_size//8//2),
result_bytes[:image_size//8//2])
self.assertTrue('\xFF'.encode('ISO-8859-1') in result_bytes)
self.assertTrue(b'\xFF' in result_bytes)

# if we have PIL, check that it can read the image
## try:
Expand Down

0 comments on commit e46495d

Please sign in to comment.