Skip to content

Commit 2f82454

Browse files
ticosaxtheskumar
authored andcommitted
Fix tests (theskumar#40)
* use pytest-cov and pytest-flake8 plugins fu * fix pycodestyle issue
1 parent 22cefa3 commit 2f82454

File tree

5 files changed

+22
-22
lines changed

5 files changed

+22
-22
lines changed

.coveragerc

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
[run]
2+
source = dotenv/
3+
omit =
4+
tests/*
5+
venv/*
6+
*conftest*

.travis.yml

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,19 @@
11
language: python
22
sudo: false
33
python:
4-
- '2.7'
5-
- '3.3'
6-
- '3.4'
7-
- '3.5'
8-
- pypy
4+
- '2.7'
5+
- '3.3'
6+
- '3.4'
7+
- '3.5'
8+
- pypy
99
install:
10-
- pip install python-coveralls
11-
- pip install -q -r requirements.txt
12-
- pip install --editable .
13-
before_script: flake8
10+
- pip install python-coveralls
11+
- pip install -q -r requirements.txt
12+
- pip install --editable .
1413
script:
15-
- coverage run --source=dotenv.py --omit='*tests*' -m py.test tests/ -v --tb=native
16-
- coverage report
14+
- pytest -v --tb=native --cov --flake8
1715
after_script:
18-
- coveralls
16+
- coveralls
1917
deploy:
2018
provider: pypi
2119
user: theskumar

dotenv/cli.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,5 +93,6 @@ def get_cli_string(path=None, action=None, key=None, value=None):
9393

9494
return ' '.join(command).strip()
9595

96+
9697
if __name__ == "__main__":
9798
cli()

requirements.txt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
flake8>=2.2.3
2-
pytest>=2.6.2
2+
pytest>=3.0.5
33
sh>=1.09
44
bumpversion
5-
coverage==3.7.1
65
wheel
6+
pytest-cov
7+
pytest-flake8

setup.cfg

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,6 @@ exclude = .tox,.git,docs,venv
88
[metadata]
99
description-file = README.rst
1010

11-
[pytest]
11+
[tool:pytest]
1212
norecursedirs = .svn _build tmp* dist venv .git
13-
14-
[coverage]
15-
source = dotenv/
16-
omit =
17-
tests*
18-
venv/*
19-
*conftest*
13+
flake8-max-line-length = 120

0 commit comments

Comments
 (0)