Skip to content

Commit 0b169d9

Browse files
committed
Use tox
1 parent e35e539 commit 0b169d9

File tree

3 files changed

+49
-4
lines changed

3 files changed

+49
-4
lines changed

.travis.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ before_install:
1111
- sudo chmod a+rw /builds
1212

1313
install:
14-
- pip3 install coverage flake8 -r requirements.txt
15-
- flake8 . --select=E9,F63,F7,F82 --show-source --statistics
16-
- sudo python setup.py install
14+
- pip3 install tox -r requirements.txt
1715

18-
script: coverage run -m pytest tests
16+
script:
17+
- tox -e lint
18+
- tox -e unit

lint-requirements.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
black>=18.9b0
2+
flake8>=3.6.0
3+
pydocstyle>=2.1.1
4+
bandit>=1.5.1

tox.ini

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
[tox]
2+
3+
[testenv:unit]
4+
deps =
5+
-rrequirements.txt
6+
pytest
7+
coverage
8+
commands = coverage run --source PSL -m pytest
9+
10+
[testenv:integration]
11+
deps = {[testenv:unit]deps}
12+
commands = coverage run --source PSL -m pytest --integration
13+
14+
[testenv:record]
15+
deps = {[testenv:unit]deps}
16+
commands = coverage run --source PSL -m pytest --record
17+
18+
[testenv:lint]
19+
deps = -rlint-requirements.txt
20+
setenv =
21+
INCLUDE_PSL_FILES = PSL/achan.py PSL/digital_channel.py PSL/logic_analyzer.py PSL/oscilloscope.py PSL/packet_handler.py
22+
commands =
23+
black --check {env:INCLUDE_PSL_FILES}
24+
flake8 --show-source {env:INCLUDE_PSL_FILES}
25+
bandit -q -r {env:INCLUDE_PSL_FILES}
26+
pydocstyle {env:INCLUDE_PSL_FILES}
27+
28+
[testenv:docs]
29+
deps = sphinx>=1.8.4
30+
commands = sphinx-build -d docs/_build/doctrees docs docs/_build/html
31+
32+
[flake8]
33+
max-line-length = 88
34+
max-complexity = 10
35+
select = B,C,E,F,W,T4,B9
36+
ignore = E203,E231,W503 # Conflict with black.
37+
38+
39+
[pydocstyle]
40+
convention = numpy
41+

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy