-
-
Notifications
You must be signed in to change notification settings - Fork 4
/
tox.ini
80 lines (73 loc) Β· 3.21 KB
/
tox.ini
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
[tox]
minversion = 3.8.0
envlist = py310, mypy, flake8
isolated_build = true
[gh-actions]
python =
3.10: py310, mypy, flake8
[testenv]
setenv =
PYTHONPATH = {toxinidir}
deps =
-r{toxinidir}/requirements_dev.txt
commands =
pytest --basetemp={envtmpdir} --cov --cov-append --cov-report=term-missing \
# Ignore tests that require a non-headless browser and are only supported on a local machine:
--ignore=test/browser/input/select_1_test.py \
--ignore=test/browser/input/select_headless_exception_test.py \
--ignore=test/browser/viewport/get/height_non_headless_1_test.py \
--ignore=test/browser/viewport/get/size_non_headless_1_test.py \
--ignore=test/browser/viewport/get/width_non_headless_1_test.py \
--ignore=test/browser/viewport/set/height_non_headless_2_test.py \
--ignore=test/browser/viewport/set/size_non_headless_2_test.py \
--ignore=test/browser/viewport/set/size_by_device_non_headless_test.py \
--ignore=test/browser/viewport/set/width_non_headless_2_test.py \
--ignore=test/browser/window/get/height_1_test.py \
--ignore=test/browser/window/get/position_1_test.py \
--ignore=test/browser/window/get/size_1_test.py \
--ignore=test/browser/window/get/width_1_test.py \
--ignore=test/browser/window/set/height_2_test.py \
--ignore=test/browser/window/set/position_2_test.py \
--ignore=test/browser/window/set/size_2_test.py \
--ignore=test/browser/window/set/width_2_test.py \
--ignore=test/browser/window/fullscreen_test.py \
--ignore=test/browser/window/maximize_test.py \
--ignore=test/browser/window/minimize_test.py \
# Ignore tests that evalaute methods indirectly by timing and/or network performance,
# and so they likely to fail on GitHub Actions. Only run on a local machine:
--ignore=test/browser/open/url_if_not_current/timing_performance_test.py \
--ignore=test/browser/wait/random_seconds_test.py \
--ignore=test/browser/wait/seconds_test.py \
# Fails on GitHub Actions, but not when running Pytest on a local machine:
--ignore=test/browser/check_if/is_image_loaded_test.py \
--ignore=test/browser/get/dimensions_1_test.py \
--ignore=test/browser/open/url_if_not_current/ignore_https_test.py \
--ignore=test/browser/set_viewport_test.py \
--ignore=test/browser/scroll/check_if/is_end_of_page_flow_test.py \
--ignore=test/browser/wait/until/images_have_loaded_test.py \
--ignore=test/helper/image/is_element_loaded_test.py \
--ignore=test/settings/download_dir/is_file_downloaded_test.py \
--ignore=test/type/xpath/exception_handling/method/wait_until_images_have_loaded_test.py
[testenv:mypy]
basepython = python3.10
deps =
-r{toxinidir}/requirements_dev.txt
types-requests
commands = mypy --install-types --non-interactive src
[testenv:flake8]
basepython = python3.10
deps = flake8
commands = flake8 src test
[testenv:report]
deps = coverage
skip_install = true
commands =
coverage report
coverage html
[testenv:clean]
deps = coverage
skip_install = true
commands = coverage erase
[coverage:report]
exclude_lines =
pragma: no cover