From d319f4ebaedc163ec21a39ca124c51ccbf453afb Mon Sep 17 00:00:00 2001 From: Victor Uriarte Date: Thu, 16 Feb 2017 03:12:02 -0700 Subject: [PATCH] Add requirements.txt and pytest options Pytest options provide summary for skipped/xfailed tests and adds color on appveyor --- .travis.yml | 4 ++-- appveyor.yml | 5 ++--- requirements.txt | 11 +++++++++++ setup.cfg | 4 ++++ 4 files changed, 19 insertions(+), 5 deletions(-) create mode 100644 requirements.txt diff --git a/.travis.yml b/.travis.yml index dabc5c3..cedd01b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -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: diff --git a/appveyor.yml b/appveyor.yml index facdacf..490c4b2 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -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: diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..19c3693 --- /dev/null +++ b/requirements.txt @@ -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 diff --git a/setup.cfg b/setup.cfg index 5ee7224..f05de82 100644 --- a/setup.cfg +++ b/setup.cfg @@ -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