Add requirements.txt and pytest options

Pytest options provide summary for skipped/xfailed tests
and adds color on appveyor
This commit is contained in:
Victor Uriarte 2017-02-16 03:12:02 -07:00
Родитель 433dc33edc
Коммит d319f4ebae
4 изменённых файлов: 19 добавлений и 5 удалений

Просмотреть файл

@ -34,8 +34,8 @@ before_install:
- export LD_LIBRARY_PATH=$PY_LIBDIR:$LD_LIBRARY_PATH
install:
- pip install --upgrade pycparser coverage codecov pytest
# setup.py install works too, but need to deal w Python.test then
- pip install --upgrade -r requirements.txt
# `setup.py install` works too, but need to deal with `Python.Test` PATH
- coverage run setup.py build_ext --inplace
script:

Просмотреть файл

@ -40,10 +40,9 @@ init:
- python -c "import ctypes; print(ctypes.sizeof(ctypes.c_wchar))"
install:
# install for wheels & coverage
- pip install --upgrade pip wheel coverage codecov pytest
- pip install --upgrade -r requirements.txt
# Install OpenCover. Can't put on packages.config; not Linux/Mono compatible
# Install OpenCover. Can't put on `packages.config`, not Mono compatible
- .\tools\nuget\nuget.exe install OpenCover -OutputDirectory packages
build_script:

11
requirements.txt Normal file
Просмотреть файл

@ -0,0 +1,11 @@
# Requirements for both Travis and AppVeyor
pytest
coverage
# Platform specific requirements
pip; sys_platform == 'win32'
wheel; sys_platform == 'win32'
pycparser; sys_platform != 'win32'
# Coverage upload
codecov

Просмотреть файл

@ -1,2 +1,6 @@
# Don't combine `.bumpversion.cfg` with `setup.cfg`. Messes up formatting.
[tool:pytest]
xfail_strict = True
# -r fsxX: show extra summary info for: (f)ailed, (s)kip, (x)failed, (X)passed
addopts = -r fsxX --color=yes