Skip to content

Commit 9a70f16

Browse files
committed
Adding a tox and other configuration files needed in core subpackage.
The coverage RC file for the core subpackage intentionally leaves out google.cloud._testing. This is because the core tests don't use the entire functionality of the _testing module, but the umbrella package does. By leaving the module in the google-cloud-core package, every other package can depend on it and have the test helpers ready to access.
1 parent 8f9cca4 commit 9a70f16

File tree

2 files changed

+42
-0
lines changed

2 files changed

+42
-0
lines changed

core/.coveragerc

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
[run]
2+
branch = True
3+
4+
[report]
5+
omit =
6+
*/google/cloud/_testing.py
7+
fail_under = 100
8+
show_missing = True
9+
exclude_lines =
10+
# Re-enable the standard pragma
11+
pragma: NO COVER
12+
# Ignore debug-only repr
13+
def __repr__

core/tox.ini

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
[tox]
2+
envlist =
3+
py27,py34,py35,cover
4+
5+
[testing]
6+
deps =
7+
pytest
8+
covercmd =
9+
py.test --quiet \
10+
--cov=google.cloud \
11+
--cov=unit_tests \
12+
--cov-config {toxinidir}/.coveragerc \
13+
unit_tests
14+
15+
[testenv]
16+
commands =
17+
py.test --quiet {posargs} unit_tests
18+
deps =
19+
{[testing]deps}
20+
21+
[testenv:cover]
22+
basepython =
23+
python2.7
24+
commands =
25+
{[testing]covercmd}
26+
deps =
27+
{[testenv]deps}
28+
coverage
29+
pytest-cov

0 commit comments

Comments
 (0)