Skip to content

Commit 808cc01

Browse files
committed
Switching from nosetests to py.test.
1 parent 192023d commit 808cc01

File tree

7 files changed

+19
-25
lines changed

7 files changed

+19
-25
lines changed

.coveragerc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
[run]
2+
branch = True
3+
14
[report]
25
omit =
36
*/_generated/*.py

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ pip-log.txt
2626
# Unit test / coverage reports
2727
.coverage
2828
.tox
29-
nosetests.xml
29+
.cache
3030

3131
# Translations
3232
*.mo

CONTRIBUTING.rst

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ Running Tests
118118
--------------
119119

120120
- To run all tests for ``gcloud-python`` on a single Python version, run
121-
``nosetests`` from your development virtualenv (See
121+
``py.test`` from your development virtualenv (See
122122
*Using a Development Checkout* above).
123123

124124
- To run the full set of ``gcloud-python`` tests on all platforms, install
@@ -272,11 +272,7 @@ Test Coverage
272272
-------------
273273

274274
- The codebase *must* have 100% test statement coverage after each commit.
275-
You can test coverage via ``tox -e coverage``, or alternately by installing
276-
``nose`` and ``coverage`` into your virtualenv, and running
277-
``setup.py nosetests --with-coverage``. If you have ``tox`` installed::
278-
279-
$ tox -e cover
275+
You can test coverage via ``tox -e cover``.
280276

281277
Documentation Coverage and Building HTML Documentation
282278
------------------------------------------------------

appveyor.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ build_script:
8383
test_script:
8484
- "%CMD_IN_ENV% pip list"
8585
# Run the project tests
86-
- "%CMD_IN_ENV% python setup.py nosetests"
86+
- "%CMD_IN_ENV% py.test"
8787

8888
after_test:
8989
# If tests are successful, create binary packages for the project.

appveyor/requirements.txt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,7 @@
33
# pip will build them from source using the MSVC compiler matching the
44
# target Python version and architecture
55
wheel
6-
nose
7-
nose-exclude
6+
pytest
87
cryptography
98
grpcio >= 1.0rc1
109
grpc-google-pubsub-v1

setup.cfg

Lines changed: 0 additions & 2 deletions
This file was deleted.

tox.ini

Lines changed: 11 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -4,18 +4,13 @@ envlist =
44

55
[testing]
66
deps =
7-
nose
8-
nose-exclude
7+
pytest
98
covercmd =
10-
nosetests \
11-
--exclude-dir=system_tests \
12-
--with-coverage \
13-
--cover-package=gcloud \
14-
--cover-package=unit_tests \
15-
--cover-erase \
16-
--cover-tests \
17-
--cover-branches \
18-
--nocapture
9+
py.test \
10+
--cov=gcloud \
11+
--cov=unit_tests \
12+
--cov-config {toxinidir}/.coveragerc \
13+
unit_tests
1914

2015
[grpc]
2116
deps =
@@ -28,7 +23,7 @@ deps =
2823

2924
[testenv]
3025
commands =
31-
nosetests
26+
py.test {posargs}
3227
deps =
3328
{[testing]deps}
3429
{[grpc]deps}
@@ -44,15 +39,18 @@ deps =
4439
basepython =
4540
python2.7
4641
commands =
47-
{[testing]covercmd} --cover-min-percentage=100
42+
{[testing]covercmd}
43+
coverage report --show-missing --fail-under=100
4844
deps =
4945
{[testenv]deps}
5046
coverage
47+
pytest-cov
5148

5249
[testenv:coveralls]
5350
basepython = {[testenv:cover]basepython}
5451
commands =
5552
{[testing]covercmd}
53+
coverage report --show-missing
5654
coveralls
5755
deps =
5856
{[testenv:cover]deps}

0 commit comments

Comments
 (0)