This repository has been archived by the owner on May 23, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 36
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Buck Golemon
committed
Oct 24, 2014
1 parent
c6aa8c5
commit 6cb6fd6
Showing
7 changed files
with
64 additions
and
37 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,23 @@ | ||
#!/bin/bash | ||
set -ex | ||
TOP=${TOP:-.} | ||
TOP=$(readlink -f ${TOP:-.}) | ||
SITEPACKAGES=${SITEPACKAGES:-.} | ||
PROJECT=venv_update | ||
NCPU=$(getconf _NPROCESSORS_CONF) | ||
|
||
export PYTHONPATH=$(readlink -f $SITEPACKAGES) | ||
|
||
python --version | ||
coverage --version | ||
py.test --version | ||
coverage erase | ||
coverage run --parallel-mode --rcfile=$TOP/.coveragerc \ | ||
-m pytest "$@" $TOP/test $SITEPACKAGES/${PROJECT}.py | ||
py.test "$@" -n $NCPU \ | ||
--cov-enable --cov-config=$TOP/.coveragerc --cov-report='' \ | ||
$TOP/test $SITEPACKAGES/${PROJECT}.py | ||
coverage combine | ||
coverage report --fail-under 81 # FIXME: should be 100 | ||
mv .coverage $TOP | ||
|
||
|
||
if [[ $CI ]]; then | ||
mv .coverage $TOP | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# Things that I want to do, but would put me past my deadline: | ||
|
||
* I could remove the --cov-config with a small patch to pytest-cov | ||
use os.path.abspath(options.cov_config) in postprocess(options) | ||
|
||
* coverage.py adds some helpful warnings to stderr, with no way to quiet them. | ||
there's already an issue (#2 i think?), just needs a patch | ||
|
||
* pytest-timeout won't actually time-out with floating-point, zero, or negative input |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
[pytest] | ||
addopts = -rfE --doctest-modules | ||
addopts = -v -rfE --doctest-modules | ||
norecursedirs = | ||
.tox | ||
tmp* | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,18 @@ | ||
# minimal set of packages to run tests, under tox, for example | ||
# minimal set of packages to run tests (under tox, for example) | ||
-r testing.txt | ||
|
||
pytest-xdist | ||
pytest-timeout | ||
|
||
# NOTE: versions must be specified in dependency DFS post-order or else we get the wrong versions. | ||
|
||
#coverage ## pending pull request: https://bitbucket.org/ned/coveragepy/pull-request/42 | ||
hg+https://bitbucket.org/bukzor/coverage.py@__main__-support | ||
|
||
# cov-core ## pending pull requests: | ||
# * https://github.com/schlamar/cov-core/pull/6 | ||
# * https://github.com/schlamar/cov-core/pull/7 | ||
git+git://github.com/bukzor/cov-core.git@master | ||
|
||
# pytest-cov ## pending pull request: https://github.com/schlamar/pytest-cov/pull/21 | ||
git+git://github.com/bukzor/pytest-cov.git@enable-coveragerc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,4 @@ | ||
# packages imported by tests | ||
# minimal set of requirements to import (but not run) test code | ||
# this is used by the lint environment. | ||
-r prod.txt | ||
clom>=0.8.0a1 | ||
pytest | ||
pytest-timeout |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters