Skip to content

Commit

Permalink
test_ATR: fix test for Python 2.6
Browse files Browse the repository at this point in the history
Ability to use assertRaises() as a context manager has been introduced
in Python 2.7.
Do not use this feature for now.
  • Loading branch information
LudovicRousseau committed May 16, 2018
1 parent 05625ca commit bdac96b
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions test/test_ATR.py
Original file line number Diff line number Diff line change
Expand Up @@ -150,11 +150,8 @@ def test_ATR6(self):

def test_ATR_TS(self):
atr = [0x42]
with self.assertRaises(SmartcardException) as cm:
with self.assertRaises(SmartcardException):
a = ATR(atr)
the_exception = cm.exception
print(the_exception)
self.assertEqual(str(the_exception), "invalid TS 0x42")

def test_ATR_get(self):
atr = "3B F2 95 12 34 01 36 06"
Expand Down

0 comments on commit bdac96b

Please sign in to comment.