Skip to content

Commit

Permalink
execute also new tests in Travis
Browse files Browse the repository at this point in the history
not a backport, necessary to make the tests runnable on 0.13 branch
  • Loading branch information
tomato42 committed Oct 7, 2019
1 parent 99c907d commit b95be03
Show file tree
Hide file tree
Showing 8 changed files with 33 additions and 2 deletions.
2 changes: 2 additions & 0 deletions .coveragerc
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,5 @@ omit =
ecdsa/six.py
ecdsa/_version.py
ecdsa/test_ecdsa.py
ecdsa/test_der.py
ecdsa/test_malformed_sigs.py
6 changes: 6 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
# workaround for 3.7 not available in default configuration
# travis-ci/travis-ci#9815
dist: trusty
sudo: false
language: python
cache: pip
before_cache:
- rm -f $HOME/.cache/pip/log/debug.log
python:
- "2.6"
- "2.7"
Expand All @@ -14,6 +18,8 @@ install:
- if [[ -e build-requirements-${TRAVIS_PYTHON_VERSION}.txt ]]; then travis_retry pip install -r build-requirements-${TRAVIS_PYTHON_VERSION}.txt; else travis_retry pip install -r build-requirements.txt; fi
script:
- coverage run setup.py test
- if [[ $TRAVIS_PYTHON_VERSION != 3.2 && ! $TRAVIS_PYTHON_VERSION =~ py ]]; then tox -e py${TRAVIS_PYTHON_VERSION/./}; fi
- if [[ $TRAVIS_PYTHON_VERSION =~ py ]]; then tox -e $TRAVIS_PYTHON_VERSION; fi
- python setup.py speed
after_success:
- coveralls
1 change: 1 addition & 0 deletions build-requirements-3.2.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@ PyYAML<3.13
tox<3.0
wheel<0.30
virtualenv==15.2.0
pytest>2.7.3
1 change: 1 addition & 0 deletions build-requirements-3.3.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@ python-coveralls
tox<3.0
wheel<0.30
virtualenv==15.2.0
pluggy<0.6
3 changes: 3 additions & 0 deletions build-requirements.txt
Original file line number Diff line number Diff line change
@@ -1 +1,4 @@
python-coveralls
pytest>3.0.7
pytest-cov<2.7.0
tox
2 changes: 1 addition & 1 deletion ecdsa/test_der.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
except ImportError:
import unittest
from .der import remove_integer, UnexpectedDER, read_length
from six import b
from .six import b

class TestRemoveInteger(unittest.TestCase):
# DER requires the integers to be 0-padded only if they would be
Expand Down
2 changes: 1 addition & 1 deletion ecdsa/test_malformed_sigs.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import pytest
import hashlib

from six import b, binary_type
from .six import b, binary_type
from .keys import SigningKey, VerifyingKey
from .keys import BadSignatureError
from .util import sigencode_der, sigencode_string
Expand Down
18 changes: 18 additions & 0 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
[tox]
envlist = py26, py27, py33, py34, py35, py36, py37, pypy, pypy3


[testenv]
deps =
py{33}: py<1.5
py{33}: pytest<3.3
py{26}: unittest2
py{26,27,34,35,36,37,py,py3}: pytest
py{33}: wheel<0.30
coverage

commands = coverage run --branch -m pytest

[testenv:coverage]
sitepackages=True
commands = coverage run --branch -m pytest

0 comments on commit b95be03

Please sign in to comment.