Skip to content

Commit fbcfce0

Browse files
committed
Replaced test runner: pytest instead of nosetest.
1 parent a9271e0 commit fbcfce0

File tree

7 files changed

+15
-13
lines changed

7 files changed

+15
-13
lines changed

.appveyor.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,10 @@ install:
2525

2626
# Check that we have the expected version and architecture for Python
2727
- "python --version"
28-
- "python -c \"import struct; print(struct.calcsize('P') * 8)\""
28+
- "python -c \"import struct; print(struct.calcsize('P') * 8)\""
2929

3030
build: off
3131

3232
test_script:
3333
# Run the project tests
34-
- "%CMD_IN_ENV% python bin/fades -v -r requirements.txt -x nosetests -v -s tests"
34+
- "%CMD_IN_ENV% python bin/fades -v -r requirements.txt -x pytest"

.travis.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,14 @@
11
language: python
22

33
python:
4-
- "3.3"
5-
- "3.4"
64
- "3.5"
75
- "3.6"
86
- "3.7-dev"
97
install:
108
- "pip install -r requirements.txt"
119
- if [[ $TRAVIS_PYTHON_VERSION == '3.6' ]]; then pip install python-coveralls ; fi
1210
script:
13-
- "nosetests --with-xcoverage --cover-package=fades -v fades tests"
11+
- "pytest --cov=fades"
1412
after_script:
1513
- "flake8 fades --max-line-length=99 --select=E,W,F,C,N"
1614

requirements.txt

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
flake8==3.5.0
22
logassert==2
33
mccabe==0.6.1
4-
nose==1.3.7
5-
nosexcover==1.0.10
64
pep257==0.7.0
75
pep8==1.7.0
86
pycodestyle==2.3.1
@@ -12,3 +10,9 @@ pyxdg==0.25
1210
rst2html5==1.9.3
1311
setuptools>=5.5
1412
wheel==0.26.0
13+
coverage==4.0.3
14+
pytest==4.4.2
15+
pytest-xdist==1.28.0
16+
pytest-sugar==0.9.2
17+
pytest-cov==2.5.1
18+
pytest-mock==1.10.4

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ def finalize_options(self):
121121
'install': CustomInstall,
122122
},
123123
install_requires=['setuptools'],
124-
tests_require=['logassert', 'pyxdg', 'pyuca', 'nose', 'flake8',
124+
tests_require=['logassert', 'pyxdg', 'pyuca', 'pytest', 'flake8',
125125
'pep257', 'rst2html5'], # what unittests require
126126
python_requires='>=3.3', # Minimum Python version supported.
127127
extras_require={

test

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,12 @@ set -eu
77
if [ $# -ne 0 ]; then
88
TARGET_TESTS="$@"
99
else
10-
TARGET_TESTS="fades tests"
10+
TARGET_TESTS=""
1111
fi
1212

1313
FADES='./bin/fades -r requirements.txt'
1414

15-
$FADES -x nosetests --with-xcoverage --cover-package=fades -v -s $TARGET_TESTS
15+
$FADES -x pytest --cov=fades $TARGET_TESTS
1616

1717
# check if we are using exit() in the code.
1818
if grep -r -n ' exit(' --include="*.py" .; then echo 'Please use sys.exit() instead of exit(). https://github.com/PyAr/fades/issues/280'; fi

testdev

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ set -eu
77
if [ $# -ne 0 ]; then
88
TARGET_TESTS="$@"
99
else
10-
TARGET_TESTS="fades tests"
10+
TARGET_TESTS=""
1111
fi
1212

13-
./bin/fades -r requirements.txt -x nosetests -v -s $TARGET_TESTS
13+
./bin/fades -r requirements.txt -x pytest $TARGET_TESTS

testdev.bat

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,4 @@ if not [%*] == [] (
88
set TARGET_TESTS=fades tests
99
)
1010

11-
bin\fades -r requirements.txt -x nosetests -v -s %TARGET_TESTS%
11+
bin\fades -r requirements.txt -x pytest -v %TARGET_TESTS%

0 commit comments

Comments
 (0)