Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitd7ad0b0

Browse files
committed
Collect PyPy and AppVeyor coverage using tox
Coverage of PyPy was disabled however it workswithout trouble, albeit a little slow.To allow tox to run tests under coverage,and with arguments passed to coverage,PYTEST_COMMAND can now be used to overridethe default command used to run the tests.Due to pips inability to deal with multiplerequirements for the same package, six==1.9 isforcably installed after the tox environmenthas been setup.
1 parentbc3d25a commitd7ad0b0

File tree

4 files changed

+31
-19
lines changed

4 files changed

+31
-19
lines changed

‎.appveyor.yml

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
# To activate, change the Appveyor settings to use `.appveyor.yml`.
2-
init:
3-
-SET PATH=C:\\Python27\\Scripts\\;%PATH%"
2+
environment:
3+
PATH:"C:\\Python27\\Scripts\\;%PATH%"
4+
PYTEST_COMMAND:"coverage run --parallel-mode -m pytest"
45

56
install:
67
-git submodule update --init --recursive
7-
-python -m pip install tox
8+
-python -m pip install tox codecov
89

910
build:off
1011

@@ -13,3 +14,7 @@ test_script:
1314

1415
after_test:
1516
-python debug-info.py
17+
18+
on_success:
19+
-coverage combine
20+
-codecov

‎.travis.yml

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -12,20 +12,21 @@ sudo: false
1212
cache:pip
1313

1414
env:
15-
-USE_OPTIONAL=true
16-
-USE_OPTIONAL=false
17-
-SIX_VERSION=1.9 USE_OPTIONAL=true
15+
global:
16+
-PYTEST_COMMAND="coverage run -m pytest"
17+
matrix:
18+
-TOXENV=optional
19+
-TOXENV=base
20+
-TOXENV=six19
1821

1922
install:
20-
-./requirements-install.sh
23+
-pipinstall tox codecov
2124

2225
script:
23-
-if [[ $TRAVIS_PYTHON_VERSION == pypy* ]]; then py.test; fi
24-
-if [[ $TRAVIS_PYTHON_VERSION != pypy* ]]; then coverage run -m pytest; fi
25-
-bash flake8-run.sh
26+
-tox
2627

2728
after_script:
2829
-python debug-info.py
2930

3031
after_success:
31-
-if [[ $TRAVIS_PYTHON_VERSION != pypy* ]]; thencodecov; fi
32+
-codecov

‎requirements-test.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
-r requirements.txt
22

3+
tox
4+
35
flake8<3.0
6+
47
pytest
8+
coverage
59
pytest-expect>=1.1,<2.0
610
mock

‎tox.ini

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,23 @@
11
[tox]
2-
envlist = {py27,py33,py34,py35,py36,pypy}-{base,optional}
2+
envlist = {py27,py33,py34,py35,py36,pypy}-{base,six19,optional}
33

44
[testenv]
55
deps =
6-
flake8<3.0
7-
pytest
8-
pytest-expect>=1.1,<2.0
9-
mock
10-
base: six
11-
base: webencodings
126
optional: -r{toxinidir}/requirements-optional.txt
7+
-r{toxinidir}/requirements-test.txt
138
doc: Sphinx
149

10+
passenv =
11+
PYTEST_COMMAND
12+
COVERAGE_RUN_OPTIONS
1513
commands =
16-
{envbindir}/py.test {posargs}
14+
six19: pip installsix==1.9
15+
{env:PYTEST_COMMAND:{envbindir}/py.test} {posargs}
1716
flake8 {toxinidir}
1817

1918
[testenv:doc]
2019
changedir = doc
2120
commands = sphinx-build -b html . _build
21+
22+
[flake8]
23+
exclude = ./.tox

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp