Skip to content

Commit d60799f

Browse files
committed
test: use tox to test Flask 1
Remove Flask 1 dependency from pyproject.toml. Instead, add a flask1 factor to tox.ini, and use it for testing Flask 1.
1 parent 3232b2c commit d60799f

File tree

3 files changed

+18
-11
lines changed

3 files changed

+18
-11
lines changed

pyproject.toml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -58,11 +58,6 @@ pyfakefs = "^4.3.2"
5858
pprintpp = ">=0.4.0"
5959
coverage = "^5.3"
6060
pytest-mock = "^3.5.1"
61-
flask = "^1.1.2"
62-
MarkupSafe = "2.0.1"
63-
jinja2 = ">=2.10.1,<3"
64-
itsdangerous = ">=0.24,<2"
65-
Werkzeug = ">=0.15,<2"
6661
SQLAlchemy = { version = "^1.4.11", python = "^3.7"}
6762
tox = "^3.22.0"
6863
tox-pyenv = "^1.1.0"

requirements-flask1.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
flask == 1.1.2
2+
MarkupSafe == 2.0.1
3+
jinja2 >=2.10.1, <3
4+
itsdangerous >=0.24,<2
5+
Werkzeug >=0.15,<2

tox.ini

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,27 @@
11
[tox]
22
isolated_build = true
3-
envlist = py37-django{2,3}, py3{8,9,10}-django{2,3,4}
3+
# The *-web environments test the latest versions of Django and Flask with the full test suite. For
4+
# older version of the web frameworks, just run the tests that are specific to them.
5+
envlist = py3{8,9,10}-web, py3{7,8,9,10}-flask1-django{2,3}
46

57
[testenv]
8+
69
deps=
710
poetry>=1.2.0
811
pytest-django
9-
django2: Django>=2.2,<3.0
10-
django3: Django>=3.2,<4.0
11-
django4: Django>=4.0,<5.0
12+
web: Django >=4.0, <5.0
13+
web: Flask >= 2
14+
flask1: -rrequirements-flask1.txt
15+
django2: Django >=2.2, <3.0
16+
django3: Django >=3.2, <4.0
17+
1218

1319
allowlist_externals = env
1420
commands =
1521
# Turn off recording while installing. It's not necessary, and the warning messages that come
1622
# out of the agent confuse poetry.
1723
env APPMAP=false poetry install -v
18-
django3: poetry run {posargs:pytest -v}
24+
web: poetry run {posargs:pytest -vv}
25+
flask1: poetry run pytest appmap/test/test_flask.py
1926
django2: poetry run pytest appmap/test/test_django.py
20-
django4: poetry run pytest appmap/test/test_django.py
27+
django3: poetry run pytest appmap/test/test_django.py

0 commit comments

Comments
 (0)