File tree Expand file tree Collapse file tree 3 files changed +32
-10
lines changed
Expand file tree Collapse file tree 3 files changed +32
-10
lines changed Original file line number Diff line number Diff line change 11language : python
22dist : trusty
3- python :
4- - " 2.7"
5- - " 3.6"
3+
64install :
7- - pip install -e .
8- - pip install pytest-cov codecov
9- - pip freeze
5+ - pip install tox codecov
6+
7+ matrix :
8+ include :
9+ - python : 2.7
10+ env : TOXENV=py27
11+ - python : 3.7
12+ env : TOXENV=py37
13+
1014script :
11- - py.test --cov-config=.coveragerc --cov=dirhash tests/
15+ - tox -e TOXENV
16+
1217after_success :
13- - coverage report
14- - codecov
18+ - codecov -e TOXENV
Original file line number Diff line number Diff line change 11from __future__ import print_function , division
22
33import os
4+ import sys
45import shlex
56import subprocess
67
910import pytest
1011
1112
13+ console_script = os .path .join (
14+ os .path .dirname (sys .executable ),
15+ 'dirhash'
16+ )
17+
18+
1219def dirhash_run (argstring , add_env = None ):
20+ assert os .path .isfile (console_script )
21+ assert os .access (console_script , os .X_OK )
1322 if add_env :
1423 env = os .environ .copy ()
1524 env .update (add_env )
1625 else :
1726 env = None
1827 process = subprocess .Popen (
19- ['dirhash' ] + shlex .split (argstring ),
28+ [console_script ] + shlex .split (argstring ),
2029 stdout = subprocess .PIPE ,
2130 stderr = subprocess .PIPE ,
2231 env = env
Original file line number Diff line number Diff line change 1+ [tox]
2+ envlist = py27,py37
3+
4+ [testenv]
5+ deps =
6+ pytest-cov
7+ commands =
8+ py.test --cov-report =xml --cov-config =.coveragerc --cov =dirhash tests/
9+ coverage report
You can’t perform that action at this time.
0 commit comments