File tree Expand file tree Collapse file tree 4 files changed +57
-14
lines changed Expand file tree Collapse file tree 4 files changed +57
-14
lines changed Original file line number Diff line number Diff line change 1
1
__pycache__
2
2
* .pyc
3
3
.idea
4
+ * .egg-info /
5
+ .tox /
Original file line number Diff line number Diff line change 1
- # vim ft=yaml
2
1
dist : xenial
3
2
language : python
4
3
5
4
sudo : false
6
5
7
- python :
8
- - " 2.7"
9
- - " 3.6"
10
- - " 3.7"
6
+ matrix :
7
+ include :
8
+ - python : " 2.7"
9
+ env : TOXENV=ci27
10
+ - python : " 3.6"
11
+ env : TOXENV=ci36
12
+ - python : " 3.7"
13
+ env : TOXENV=ci37
11
14
12
15
cache :
13
16
- pip
14
17
15
18
install :
16
- - pip install -r requirements-dev.txt
19
+ - pip install tox
17
20
18
21
script :
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
22
+ - tox
25
23
26
24
after_success :
27
25
- codecov
Original file line number Diff line number Diff line change 1
- from setuptools import setup
1
+ from setuptools import setup , find_packages
2
2
3
3
setup (
4
- name = "python-patterns" ,
4
+ name = "patterns" ,
5
+ packages = find_packages (),
5
6
description = "A collection of design patterns and idioms in Python." ,
6
7
classifiers = [
7
8
"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