Skip to content

Commit

Permalink
Remove py2 compatibility code.
Browse files Browse the repository at this point in the history
  • Loading branch information
drvinceknight committed Dec 4, 2016
1 parent 07c93ae commit 7f6747d
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions axelrod/tests/unit/test_deterministic_cache.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,7 @@ def setUpClass(cls):
cls.test_value = [('C', 'D'), ('D', 'D'), ('D', 'D')]
cls.test_save_file = 'test_cache_save.txt'
cls.test_load_file = 'test_cache_load.txt'
if sys.version_info[0] == 2:
# Python 2.x
cls.test_pickle = b"""(dp0\n(caxelrod.strategies.titfortat\nTitForTat\np1\ncaxelrod.strategies.defector\nDefector\np2\nI3\ntp3\n(lp4\n(S'C'\np5\nS'D'\np6\ntp7\na(g6\ng6\ntp8\na(g6\ng6\ntp9\nas."""
else:
# Python 3.x
cls.test_pickle = b'\x80\x03}q\x00X\x0b\x00\x00\x00Tit For Tatq\x01X\x08\x00\x00\x00Defectorq\x02K\x03\x87q\x03]q\x04(X\x01\x00\x00\x00Cq\x05X\x01\x00\x00\x00Dq\x06\x86q\x07h\x06h\x06\x86q\x08h\x06h\x06\x86q\tes.'
cls.test_pickle = b'\x80\x03}q\x00X\x0b\x00\x00\x00Tit For Tatq\x01X\x08\x00\x00\x00Defectorq\x02K\x03\x87q\x03]q\x04(X\x01\x00\x00\x00Cq\x05X\x01\x00\x00\x00Dq\x06\x86q\x07h\x06h\x06\x86q\x08h\x06h\x06\x86q\tes.'
with open(cls.test_load_file, 'wb') as f:
f.write(cls.test_pickle)

Expand Down

0 comments on commit 7f6747d

Please sign in to comment.