Skip to content

Commit 83869f6

Browse files
author
Kevin McDonald
committed
Covert to using pytest for the test runner
1 parent c07fa8e commit 83869f6

File tree

5 files changed

+11
-13
lines changed

5 files changed

+11
-13
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ Thumbs.db
55
._*
66
*.pyc
77
.coverage
8+
htmlcov
89
cover/*
910
.tox
1011
docs/_build/*

setup.cfg

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
1-
[nosetests]
2-
verbosity=1
3-
detailed-errors=1
1+
[pytest]
2+
python_files = *_tests.py
43

54
[wheel]
65
universal=1

setup.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@
3030
'sl = SoftLayer.CLI.deprecated:main',
3131
],
3232
},
33-
test_suite='nose.collector',
3433
install_requires=[
3534
'six >= 1.7.0',
3635
'prettytable >= 0.7.0',

tools/test-requirements.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
tox
2-
nose
2+
pytest
3+
pytest-cov
34
mock
4-
coverage
55
sphinx
66
testtools

tox.ini

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,15 @@ setenv =
66
LANG = {env:LANG:C.UTF-8}
77

88
deps = -r{toxinidir}/tools/test-requirements.txt
9-
commands = nosetests
9+
commands = py.test SoftLayer
1010

1111
[testenv:coverage]
1212
basepython = python2.7
13-
commands = nosetests \
14-
--with-coverage \
15-
--cover-min-percentage=78 \
16-
--cover-erase \
17-
--cover-package=SoftLayer \
18-
--cover-html
13+
commands = py.test SoftLayer \
14+
--cov=SoftLayer \
15+
--cov-fail-under=78 \
16+
--cov-report=html \
17+
--cov-report=term-missing
1918

2019
[testenv:analysis]
2120
basepython = python2.7

0 commit comments

Comments
 (0)