Skip to content

Commit a66278d

Browse files
authored
Merge pull request #3 from Gusgus01/63-trackerevent_str_error
63 trackerevent str error update
2 parents 59987e9 + 5cdfad1 commit a66278d

File tree

5 files changed

+32
-11
lines changed

5 files changed

+32
-11
lines changed

.circleci/config.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ my-steps: &steps
44
- checkout
55
- run: sudo pip install -r requirements.txt
66
- run: sudo pip install flake8 pytest
7-
- run: python --version ; pip --version ; pwd ; ls
7+
- run: python --version ; pip --version ; pwd ; ls -l
88
# stop the build if there are Python syntax errors or undefined names
99
- run: flake8 . --count --select=E901,E999,F821,F822,F823 --show-source --statistics
1010
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
@@ -14,19 +14,19 @@ my-steps: &steps
1414
- run: python -m unittest discover test_replays
1515

1616
jobs:
17-
Python_2.7:
17+
Python2:
1818
docker:
19-
- image: circleci/python:2.7
19+
- image: circleci/python:2.7.15
2020
steps: *steps
2121

22-
Python_3.6:
22+
Python3:
2323
docker:
24-
- image: circleci/python:3.6
24+
- image: circleci/python:3.7
2525
steps: *steps
2626

2727
workflows:
2828
version: 2
2929
build:
3030
jobs:
31-
- Python_2.7
32-
- Python_3.6
31+
- Python2
32+
- Python3

CHANGELOG.rst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
CHANGELOG
22
============
33

4+
1.2.0 - October 7, 2018
5+
-----------------------
6+
* Added support for Tychus
7+
* Verified that StarCraft 4.6.1 replays work
8+
49
1.1.0 - June 26, 2018
510
---------------------
611
* Added support for protocol 65895 (StarCraft 4.4.0)

sc2reader/data/attributes.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -712,6 +712,7 @@
712712
"Rayn": "Raynor",
713713
"Stuk": "Stukov",
714714
"Swan": "Swann",
715+
"Tych": "Tychus",
715716
"Vora": "Vorazun",
716717
"Zaga": "Zagara"
717718
}

setup.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
setuptools.setup(
55
license="MIT",
66
name="sc2reader",
7-
version='1.1.0',
7+
version='1.2.0',
88
keywords=["starcraft 2", "sc2", "replay", "parser"],
99
description="Utility for parsing Starcraft II replay files",
1010
long_description=open("README.rst").read()+"\n\n"+open("CHANGELOG.rst").read(),
@@ -23,10 +23,11 @@
2323
"Natural Language :: English",
2424
"Operating System :: OS Independent",
2525
"Programming Language :: Python",
26-
"Programming Language :: Python :: 2.6",
2726
"Programming Language :: Python :: 2.7",
28-
"Programming Language :: Python :: 3.2",
29-
"Programming Language :: Python :: 3.3",
27+
"Programming Language :: Python :: 3.4",
28+
"Programming Language :: Python :: 3.5",
29+
"Programming Language :: Python :: 3.6",
30+
"Programming Language :: Python :: 3.7",
3031
"Programming Language :: Python :: Implementation :: PyPy",
3132
"Programming Language :: Python :: Implementation :: CPython",
3233
"Topic :: Games/Entertainment",

test_replays/test_all.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,11 @@
1111
import unittest2 as unittest
1212
else:
1313
import unittest
14+
# StringIO was changed in python 3
15+
try:
16+
from io import StringIO
17+
except ImportError:
18+
from StringIO import StringIO
1419

1520
import sc2reader
1621
from sc2reader.exceptions import CorruptTrackerFileError
@@ -582,6 +587,15 @@ def test_65895(self):
582587
factory = sc2reader.factories.SC2Factory()
583588
replay = factory.load_replay(replayfilename)
584589

590+
def test_event_print(self):
591+
replay = sc2reader.load_replay("test_replays/lotv/lotv1.SC2Replay")
592+
with StringIO() as capturedOutput:
593+
sys.stdout = capturedOutput
594+
for event in replay.events:
595+
print(event)
596+
self.assertIn("PlayerLeaveEvent", capturedOutput.getvalue())
597+
sys.stdout = sys.__stdout__
598+
585599

586600
class TestGameEngine(unittest.TestCase):
587601
class TestEvent(object):

0 commit comments

Comments
 (0)