File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11__pycache__
22* .pyc
33.idea
4+ * .egg-info /
5+ .tox /
Original file line number Diff line number Diff line change 1- # vim ft=yaml
21dist : xenial
32language : python
43
@@ -9,19 +8,23 @@ python:
98 - " 3.6"
109 - " 3.7"
1110
11+ matrix :
12+ include :
13+ - python : " 2.7"
14+ env : TOXENV=ci27
15+ - python : " 3.6"
16+ env : TOXENV=ci36
17+ - python : " 3.7"
18+ env : TOXENV=ci37
19+
1220cache :
1321 - pip
1422
1523install :
16- - pip install -r requirements-dev.txt
24+ - pip install tox
1725
1826script :
19- - if [ "${TRAVIS_PYTHON_VERSION:0:1}" = 2 ]; then export PYEXCLUDE=3; else export PYEXCLUDE=2; fi
20- - flake8 --exclude="*__py${PYEXCLUDE}.py" patterns/
21- - pytest --doctest-modules --ignore-glob="*__py${PYEXCLUDE}.py" patterns/
22- - pytest -s -vv --cov=. --log-level=INFO tests/
23- # Actually run all the scripts, contributing to coverage
24- - PYTHONPATH=. ./run_all.sh
27+ - tox
2528
2629after_success :
2730 - codecov
Original file line number Diff line number Diff line change 1- from setuptools import setup
1+ from setuptools import setup , find_packages
22
33setup (
4- name = "python-patterns" ,
4+ name = "patterns" ,
5+ packages = find_packages (),
56 description = "A collection of design patterns and idioms in Python." ,
67 classifiers = [
78 "Programming Language :: Python :: 2" ,
Original file line number Diff line number Diff line change 1+ [tox]
2+ envlist = ci27,ci36,ci37,cov-report
3+
4+
5+ [testenv]
6+ setenv =
7+ COVERAGE_FILE = .coverage.{envname}
8+
9+ [testenv:ci27]
10+ basepython = python2.7
11+ deps =
12+ -r requirements-dev.txt
13+ commands =
14+ flake8 --exclude =" *__py3.py" patterns/
15+ pytest --doctest-modules --ignore-glob =" *__py3.py" patterns/
16+ pytest -s -vv --cov ={envsitepackagesdir}/patterns --log-level =INFO tests/
17+
18+ [testenv:ci36]
19+ basepython = python3.6
20+ deps =
21+ -r requirements-dev.txt
22+ commands =
23+ flake8 --exclude =" *__py2.py" patterns/
24+ pytest --doctest-modules --ignore-glob =" *__py2.py" patterns/
25+ pytest -s -vv --cov ={envsitepackagesdir}/patterns --log-level =INFO tests/
26+
27+ [testenv:ci37]
28+ basepython = python3.7
29+ deps =
30+ -r requirements-dev.txt
31+ commands =
32+ flake8 --exclude =" *__py2.py" patterns/
33+ pytest --doctest-modules --ignore-glob =" *__py2.py" patterns/
34+ pytest -s -vv --cov ={envsitepackagesdir}/patterns --log-level =INFO tests/
35+
36+ [testenv:cov-report]
37+ setenv =
38+ COVERAGE_FILE = .coverage
39+ deps = coverage
40+ commands =
41+ coverage combine
42+ coverage report
You can’t perform that action at this time.
0 commit comments