Skip to content

Commit

Permalink
Updated test case
Browse files Browse the repository at this point in the history
  • Loading branch information
heuer committed May 23, 2022
1 parent 11062bf commit 0d70b6c
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions tests/test_issue_109_bytes.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,7 @@ def decode(qrcode):
decoded = zbardecode((qr_bytes, width, height))
assert 1 == len(decoded)
assert 'QRCODE' == decoded[0].type
data = decoded[0].data
try:
return data.decode('ascii')
except UnicodeDecodeError:
return data.decode('utf-8').encode('sjis')
return decoded[0].data.decode('utf-8').encode('shift-jis')


def test_issue_109_bytes():
Expand Down

0 comments on commit 0d70b6c

Please sign in to comment.