beeware / cricket

A GUI tool for running Python test suites.
BSD 3-Clause "New" or "Revised" License
213 stars 69 forks source link

Change type of error message to str instead of bytes. #55

Closed flowerncsu closed 7 years ago

flowerncsu commented 7 years ago

If the test suite crashed (for instance, when testing a django project, if there was a migration conflict), cricket would fail with a traceback on this line. Verified that the fix works in Python 3.5 and 2.7.

Example of the traceback cricket would throw in this instance: Exception in Tkinter callback Traceback (most recent call last): File "/usr/lib/python3.5/tkinter/init.py", line 1553, in call return self.func(args) File "/usr/lib/python3.5/tkinter/init.py", line 599, in callit func(args) File "/home/cmays/Projects/cricket/cricket/cricket/view.py", line 787, in on_testProgress if self.executor and self.executor.poll(): File "/home/cmays/Projects/cricket/cricket/cricket/executor.py", line 243, in poll self.emit('suite_error', error=b'\n'.join(self.error_buffer)) TypeError: sequence item 0: expected a bytes-like object, str found

Signed-off-by: Charlotte Mays charlotte.ann.mays@gmail.com

freakboy3742 commented 7 years ago

Thanks for the contribution!