This repository was archived by the owner on Jan 13, 2026. It is now read-only.
File tree Expand file tree Collapse file tree 6 files changed +31
-11
lines changed
src/python_multiversion_dependency_management_demo
unit/python_multiversion_dependency_management_demo Expand file tree Collapse file tree 6 files changed +31
-11
lines changed Original file line number Diff line number Diff line change @@ -42,9 +42,10 @@ coverage: python
4242 pyenv exec tox -e coverage
4343
4444.PHONY : sure
45- sure : checkformatting lint test coverage functests
45+ sure : checkformatting lint test functests
4646 pyenv exec tox -e py39-tests
4747 pyenv exec tox -e py38-tests
48+ pyenv exec tox -e coverage
4849 pyenv exec tox -e py39-functests
4950 pyenv exec tox -e py38-functests
5051
@@ -54,7 +55,7 @@ requirements:
5455
5556.PHONY : clean
5657clean :
57- rm -rf build dist .tox
58+ rm -rf build dist .coverage . tox
5859 find . -path ' */__pycache__*' -delete
5960 find . -path ' *.egg-info*' -delete
6061
Original file line number Diff line number Diff line change 22requires = [" setuptools>=42" ]
33build-backend = " setuptools.build_meta"
44
5+ [tool .coverage .run ]
6+ branch = true
7+ parallel = true
8+ source = [" python_multiversion_dependency_management_demo" , " tests/unit" ]
9+
10+ [tool .coverage .paths ]
11+ source = [" src" , " .tox/*/site-packages" ]
12+
13+ [tool .coverage .report ]
14+ show_missing = true
15+ precision = 2
16+ fail_under = 100.00
17+ skip_covered = true
18+
519[tool .pydocstyle ]
620ignore = [
721 # Missing docstrings.
Original file line number Diff line number Diff line change 1+ import sys
2+
13from flask import Flask
24
35app = Flask (__name__ )
46
57
68@app .route ("/" )
79def hello_world ():
8- return "<p>Hello, World!</p>"
10+ if sys .version .startswith ("3.9" ):
11+ return "<p>Hello, Python 3.9!</p>"
12+
13+ if sys .version .startswith ("3.8" ):
14+ return "<p>Hello, Python 3.8!</p>"
15+
16+ return "<p>Hello, Python!</p>"
Original file line number Diff line number Diff line change @@ -11,4 +11,4 @@ def client():
1111def test_request_example (client ):
1212 response = client .get ("/" )
1313
14- assert b"<p>Hello, World!</p> " in response .data
14+ assert b"<p>Hello, Python " in response .data
Original file line number Diff line number Diff line change 22
33
44def test_it ():
5- assert hello_world () == "<p>Hello, World!</p>"
5+ assert hello_world (). startswith ( "<p>Hello, Python" )
Original file line number Diff line number Diff line change 11[tox]
22envlist = py310-tests
3- skipsdist = true
43minversion = 3.25.0
54requires =
65 tox-pyenv
@@ -9,10 +8,10 @@ tox_pyenv_fallback = false
98isolated_build = true
109
1110[testenv]
12- skip_install = true
1311recreate = true
12+ skip_install =
13+ {format,checkformatting,coverage}: true
1414setenv =
15- PYTHONPATH = src
1615 FLASK_APP = python_multiversion_dependency_management_demo.app
1716deps =
1817 lint: -r requirements/py310/lint.txt
2726 py38-dev: -r requirements/py38/dev.txt
2827 py38-tests: -r requirements/py38/tests.txt
2928 py38-functests: -r requirements/py38/functests.txt
30- depends =
31- coverage: tests
3229commands =
3330 dev: flask run --port 5482
3431 lint: pylint src bin
@@ -41,5 +38,5 @@ commands =
4138 checkformatting: isort --quiet --check-only src tests bin
4239 tests: coverage run -m pytest -v {posargs:tests/unit/}
4340 functests: pytest {posargs:tests/functional/}
44- coverage: - coverage combine
41+ coverage: coverage combine
4542 coverage: coverage report
You can’t perform that action at this time.
0 commit comments