Skip to content

Commit

Permalink
re #14, exception referring to the bug in github.
Browse files Browse the repository at this point in the history
  • Loading branch information
tarpas committed Jan 4, 2018
1 parent c465568 commit 31fe409
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 4 deletions.
3 changes: 3 additions & 0 deletions exampleproject/tests/print1250r.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# -- coding:cp1250 --

print("š")
2 changes: 0 additions & 2 deletions exampleproject/tests/test_a.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@ def test_add_and_multiply():

def test_error3():
pass
pass
raise Exception('error1')


@pytest.mark.xfail(True, reason="Division by zero not implemented yet.")
Expand Down
2 changes: 2 additions & 0 deletions exampleproject/tests/test_non_utf_crash.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
def test_basic():
import print1250r
9 changes: 7 additions & 2 deletions testmon/testmon_core.py
Original file line number Diff line number Diff line change
Expand Up @@ -150,8 +150,13 @@ def get_variant_inifile(inifile):

def read_file_with_checksum(absfilename):
hasher = hashlib.sha1()
with open(absfilename) as afile:
source = afile.read()
try:
with open(absfilename) as afile:
source = afile.read()
except UnicodeDecodeError:
raise Exception("""You are hitting https://github.com/tarpas/pytest-testmon/issues/14"""
""" when reading {}""".format(absfilename))

hasher.update(encode(source))
return source, hasher.hexdigest()

Expand Down

0 comments on commit 31fe409

Please sign in to comment.