From b7fcff0d909569103e19bfe3419cea8c7d46c246 Mon Sep 17 00:00:00 2001 From: Andrey Shpak Date: Tue, 14 Apr 2020 10:52:45 +0300 Subject: [PATCH] Fix pytest warnings, tox coverage, packages compatibility (#1353) * Fix cov-report tox environment run #1350 * pytest-catchlog package removed from test_requirements, as now it is included in pytest (#1347) * Some packages versions limited to be compatible with python2.7 and python 3.5 (#1349) * Added missed coverage lines highlight to pytest-coverage report (#1352) * Changelog update for #1352 #1349 #1347 --- HISTORY.md | 8 ++++++-- setup.cfg | 3 +-- setup.py | 15 ++++++++------- test_requirements.txt | 1 - tox.ini | 10 +++++++++- 5 files changed, 24 insertions(+), 13 deletions(-) diff --git a/HISTORY.md b/HISTORY.md index 5f044c55b..992be4561 100644 --- a/HISTORY.md +++ b/HISTORY.md @@ -11,14 +11,18 @@ Important Changes: * 'future' library replaced with 'six' as a more lightweight python porting library [@asottile](https://github.com/asottile) (#941) * Added extension: Slugify template filter [@ppanero](https://github.com/ppanero) (#1336) * Added command line option: `--skip-if-file-exists`, allow to skip the existing files when doing `overwrite_if_exists`. [@chhsiao1981](https://github.com/chhsiao1981) (#1076) +* Some packages versions limited to be compatible with python2.7 and python 3.5 [@insspb](https://github.com/insspb) (#1349) -Internal CI/CD changes: +Internal CI/CD and tests changes: * Coverage comment in future merge requests disabled [@ssbarnea](https://github.com/ssbarnea) (#1279) * Fixed Python 3.8 travis tests and setup.py message [@insspb](https://github.com/insspb) (#1295, #1297) * Travis builds extended with Windows setup for all supported python versions [@insspb](https://github.com/insspb) (#1300, #1301) * Update .travis.yml to be compatible with latest travis cfg specs [@luzfcb](https://github.com/luzfcb) (#1346) -* Add new test to improve tests coverage [@amey589](https://github.com/amey589) (#1023) +* Added new test to improve tests coverage [@amey589](https://github.com/amey589) (#1023) +* Added missed coverage lines highlight to pytest-coverage report [@insspb](https://github.com/insspb) (#1352) +* pytest-catchlog package removed from test_requirements, as now it is included in pytest [@insspb](https://github.com/insspb) (#1347) +* Fixed `cov-report` tox invocation environment [@insspb](https://github.com/insspb) (#1350) Code style and docs changes: diff --git a/setup.cfg b/setup.cfg index f0b6ea93b..b218fdffc 100644 --- a/setup.cfg +++ b/setup.cfg @@ -29,5 +29,4 @@ universal = 1 [tool:pytest] testpaths = tests -addopts = --cov=cookiecutter - +addopts = --cov-report term-missing --cov=cookiecutter diff --git a/setup.py b/setup.py index a14967046..c3c76b63b 100644 --- a/setup.py +++ b/setup.py @@ -25,14 +25,15 @@ readme = readme_file.read() requirements = [ - 'binaryornot>=0.2.0', - 'jinja2>=2.7', - 'click>=7.0', - 'poyo>=0.1.0', - 'jinja2-time>=0.1.0', + 'binaryornot>=0.4.4', + 'Jinja2<=2.11.0', + 'click>=7.1.1', + 'poyo>=0.5.0', + 'jinja2-time>=0.2.0', 'python-slugify>=4.0.0', - 'requests>=2.18.0', - 'six>=1.10', + 'requests>=2.23.0', + 'six>=1.14', + 'MarkupSafe<2.0.0' ] if sys.argv[-1] == 'readme': diff --git a/test_requirements.txt b/test_requirements.txt index 7c8b4c50c..4607cefe1 100644 --- a/test_requirements.txt +++ b/test_requirements.txt @@ -1,5 +1,4 @@ pytest pytest-cov pytest-mock -pytest-catchlog freezegun diff --git a/tox.ini b/tox.ini index 90af58e6b..cc54d2e8b 100644 --- a/tox.ini +++ b/tox.ini @@ -34,4 +34,12 @@ usedevelop = false [testenv:cov-report] ; This coverage only report run. Only for local development. Not used at CI/CD -commands = pytest --cov=cookiecutter --cov-report=term --cov-report=html \ No newline at end of file +passenv = + LC_ALL + LANG + HOME +commands = + pip install -e . + pytest --cov=cookiecutter --cov-report=term --cov-report=html +deps = -rtest_requirements.txt +skip_install = true