File tree Expand file tree Collapse file tree 6 files changed +40
-12
lines changed
Expand file tree Collapse file tree 6 files changed +40
-12
lines changed Original file line number Diff line number Diff line change 11language : python
2- dist : trusty
3- python :
4- - " 2.7"
5- - " 3.6"
2+ dist : xenial
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
16+
1217after_success :
13- - coverage report
1418 - codecov
19+
20+ notifications :
21+ email :
22+ on_success : never
23+ on_failure : always
Original file line number Diff line number Diff line change 11import io
22import os
3- from setuptools import setup
3+ from setuptools import setup , find_packages
44
55VERSION = '0.1.1'
66
2727 'pathspec>=0.5.9' ,
2828 'scandir>=1.9.0;python_version<"3.5"'
2929 ],
30- packages = ['dirhash' ],
30+ packages = find_packages ('src' ),
31+ package_dir = {'' : 'src' },
3132 include_package_data = True ,
3233 entry_points = {
3334 'console_scripts' : ['dirhash=dirhash.cli:main' ],
File renamed without changes.
File renamed without changes.
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