Allow testing with tox

This commit is contained in:
Thom Wiggers 2016-02-28 12:53:35 +01:00
parent 3470fbc1c6
commit cde5b5170b
No known key found for this signature in database
GPG Key ID: AD8FF333C6DC5058
3 changed files with 9 additions and 1 deletions

1
.gitignore vendored
View File

@ -3,6 +3,7 @@ build
dist
pygit2.so
_pygit2.so
.tox/
test/*.pyc
test/__pycache__
pygit2/*.pyc

View File

@ -108,7 +108,8 @@ class TestCommand(Command):
class sdist_files_from_git(sdist):
def get_file_list(self):
popen = Popen(['git', 'ls-files'], stdout=PIPE, stderr=PIPE)
popen = Popen(['git', 'ls-files'], stdout=PIPE, stderr=PIPE,
universal_newlines=True)
stdoutdata, stderrdata = popen.communicate()
if popen.returncode != 0:
print(stderrdata)

6
tox.ini Normal file
View File

@ -0,0 +1,6 @@
[tox]
envlist = py27,py32,py33,py34,py35,pypy,pypy3
[testenv]
commands =
python setup.py test