Skip to content

Commit

Permalink
Replace nosetest with py.test as test-runner
Browse files Browse the repository at this point in the history
- Generate coverage info by default
- Remove trailing whitespace
- Also execute py.test on travis
  • Loading branch information
HolgerPeters committed Dec 16, 2016
1 parent 1308c75 commit 71a86dd
Show file tree
Hide file tree
Showing 8 changed files with 60 additions and 26 deletions.
27 changes: 27 additions & 0 deletions .coveragerc
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@

# .coveragerc to control coverage.py
[run]
branch = True

[report]
# Regexes for lines to exclude from consideration
exclude_lines =
# Have to re-enable the standard pragma
pragma: no cover

# Don't complain about missing debug-only code:
def __repr__
if self\.debug

# Don't complain if tests don't hit defensive assertion code:
raise AssertionError
raise NotImplementedError

# Don't complain if non-runnable code isn't run:
if 0:
if __name__ == .__main__.:

ignore_errors = True

[html]
directory = coverage_html_report
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,6 @@ dist

README.html
CHANGELOG.html
.cache
coverage_html_report
.coverage*
4 changes: 2 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ install:
- pip install -r requirements.txt
- pip install coveralls
- pip freeze
script: nosetests
script: py.test
after_success: coveralls
deploy:
provider: pypi
Expand All @@ -20,4 +20,4 @@ deploy:
on:
tags: true
all_branches: true

8 changes: 4 additions & 4 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,11 @@ Brandon by Example
Given a ``requirements.txt``, we can upload all listed packages to the index ``opensource/Debian_7`` on a local devpi using the following command::

$ devpi-builder requirements.txt http://localhost:3141/opensource/Debian_7 opensource mypassword

Example of such a ``requirements.txt``::

progressbar==0.2.2
progressbar==0.2.1
progressbar==0.2.2
progressbar==0.2.1
PyYAML==3.11

Commandline Usage
Expand Down Expand Up @@ -73,7 +73,7 @@ Features
========

* Read a ``requirements.txt`` style input file.
* Support multiple versions of a package in the same file
* Support multiple versions of a package in the same file
* Only build packages not yet in the target index.
* Support a black-list for packages to never be built and uploaded (certain packages like numpy are fragile regarding their interdependency with other packages).
* Can use separate indices for plain python packages and those with binary contents.
Expand Down
7 changes: 4 additions & 3 deletions requirements.in
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
-e .

setuptools_scm
nose
nose-progressive
pytest-runner
pytest
pytest-cov
pytest-mock
mock
coverage
devpi-plumber[test]
15 changes: 8 additions & 7 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,30 +4,31 @@
#
# pip-compile --no-index --output-file requirements.txt requirements.in
#

apipkg==1.4 # via execnet
blessings==1.6 # via nose-progressive
check-manifest==0.31 # via devpi-client
coverage==4.2
coverage==4.2 # via pytest-cov
devpi-client==2.6.4 # via devpi-plumber
devpi-common==3.0.1 # via devpi-client, devpi-server
devpi-plumber[test]==0.3.0
devpi-server==4.1.0 # via devpi-plumber
execnet==1.4.1 # via devpi-server
funcsigs==1.0.2 # via mock
itsdangerous==0.24 # via devpi-server
junit-xml==1.7
mock==2.0.0
nose-progressive==1.5.1
nose==1.3.7
PasteDeploy==1.5.2 # via pyramid
pbr==1.10.0 # via mock
pkginfo==1.3.2 # via devpi-client
pluggy==0.3.1 # via devpi-server, tox
py==1.4.31 # via devpi-client, devpi-common, devpi-server, tox
py==1.4.31 # via devpi-client, devpi-common, devpi-server, pytest, tox
pyramid==1.7 # via devpi-server
pytest-cov==2.4.0
pytest-mock==1.5.0
pytest-runner==2.9
pytest==3.0.5
repoze.lru==0.6 # via devpi-server, pyramid
requests==2.10.0 # via devpi-common
setuptools-scm==1.11.1
setuptools-scm==1.15.0
six==1.10.0 # via devpi-plumber, junit-xml, mock
tox==2.3.1 # via devpi-client
translationstring==1.3 # via pyramid
Expand Down
11 changes: 6 additions & 5 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
[nosetests]
with-coverage=True
cover-package=devpi_builder
with-progressive=True

[bdist_wheel]
universal = 1

[tool:pytest]
addopts = --cov-report= --cov=devpi_builder tests

[aliases]
test=pytest
11 changes: 6 additions & 5 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,16 +24,17 @@
],
setup_requires=[
'setuptools_scm',
'nose',
'nose-progressive',
'pytest',
'pytest-cov',
],
tests_require=[
'nose',
'pytest',
'pytest-cov',
'pytest-runner',
'mock',
'coverage',
'devpi-plumber[test]',
],
test_suite='nose.collector',
test_suite='pytest-runner',
classifiers=[
'Development Status :: 5 - Production/Stable',
'Environment :: Console',
Expand Down

0 comments on commit 71a86dd

Please sign in to comment.