Skip to content

Commit

Permalink
Fix pytest warnings, tox coverage, packages compatibility (#1353)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
insspb committed Apr 14, 2020
1 parent e7e0940 commit b7fcff0
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 13 deletions.
8 changes: 6 additions & 2 deletions HISTORY.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:

Expand Down
3 changes: 1 addition & 2 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -29,5 +29,4 @@ universal = 1

[tool:pytest]
testpaths = tests
addopts = --cov=cookiecutter

addopts = --cov-report term-missing --cov=cookiecutter
15 changes: 8 additions & 7 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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':
Expand Down
1 change: 0 additions & 1 deletion test_requirements.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
pytest
pytest-cov
pytest-mock
pytest-catchlog
freezegun
10 changes: 9 additions & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -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
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

0 comments on commit b7fcff0

Please sign in to comment.