Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit d319f4e

Browse files
committed
Add requirements.txt and pytest options
Pytest options provide summary for skipped/xfailed tests and adds color on appveyor
1 parent 433dc33 commit d319f4e

File tree

4 files changed

+19
-5
lines changed

4 files changed

+19
-5
lines changed

.travis.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,8 @@ before_install:
3434
- export LD_LIBRARY_PATH=$PY_LIBDIR:$LD_LIBRARY_PATH
3535

3636
install:
37-
- pip install --upgrade pycparser coverage codecov pytest
38-
# setup.py install works too, but need to deal w Python.test then
37+
- pip install --upgrade -r requirements.txt
38+
# `setup.py install` works too, but need to deal with `Python.Test` PATH
3939
- coverage run setup.py build_ext --inplace
4040

4141
script:

appveyor.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,10 +40,9 @@ init:
4040
- python -c "import ctypes; print(ctypes.sizeof(ctypes.c_wchar))"
4141

4242
install:
43-
# install for wheels & coverage
44-
- pip install --upgrade pip wheel coverage codecov pytest
43+
- pip install --upgrade -r requirements.txt
4544

46-
# Install OpenCover. Can't put on packages.config; not Linux/Mono compatible
45+
# Install OpenCover. Can't put on `packages.config`, not Mono compatible
4746
- .\tools\nuget\nuget.exe install OpenCover -OutputDirectory packages
4847

4948
build_script:

requirements.txt

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# Requirements for both Travis and AppVeyor
2+
pytest
3+
coverage
4+
5+
# Platform specific requirements
6+
pip; sys_platform == 'win32'
7+
wheel; sys_platform == 'win32'
8+
pycparser; sys_platform != 'win32'
9+
10+
# Coverage upload
11+
codecov

setup.cfg

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,6 @@
1+
# Don't combine `.bumpversion.cfg` with `setup.cfg`. Messes up formatting.
2+
13
[tool:pytest]
24
xfail_strict = True
5+
# -r fsxX: show extra summary info for: (f)ailed, (s)kip, (x)failed, (X)passed
6+
addopts = -r fsxX --color=yes

0 commit comments

Comments
 (0)