Skip to content

Commit

Permalink
tox coverage & stressor
Browse files Browse the repository at this point in the history
  • Loading branch information
mar10 committed Jan 3, 2021
1 parent 77ee721 commit 1d13249
Show file tree
Hide file tree
Showing 7 changed files with 109 additions and 60 deletions.
1 change: 0 additions & 1 deletion .gitignore
Expand Up @@ -6,7 +6,6 @@
.vscode
.pytest_cache/
build/
_build/
docs/sphinx/_autosummary/
docs/sphinx/_build/
docs/sphinx/_generated/
Expand Down
30 changes: 15 additions & 15 deletions Pipfile
Expand Up @@ -5,37 +5,37 @@ name = "pypi"

[dev-packages]
black = "==20.8b1"
Cheroot = "~=8.5"
Cheroot = "*" # "~=8.5"
cx_Freeze = {version = "*", os_name = "== 'nt'"}
flake8 = "~=3.8"
flake8-bugbear = "~=20.1"
flake8-quotes = "~=1.0"
flake8 = "*" # "~=3.8"
flake8-bugbear = "*" # "~=20.1"
flake8-quotes = "*" # "~=1.0"
isort = "*"
Paste = "~=2.0"
Paste = "*" # "~=2.0"
pylint = "*"
pytest = "~=4.6"
pytest-cov = "~=2.10"
python-pam = "~=1.8"
pytest = "*" # "~=4.6"
pytest-cov = "*" # "~=2.10"
python-pam = "*" # "~=1.8"
pywin32 = "*"
recommonmark = "*"
requests = "*"
rope = "*"
setuptools = "*"
Sphinx = "~=1.6"
Sphinx = "*" # "~=1.6"
sphinx_rtd_theme = "*"
stressor = "*"
tox = "~=3.13"
tox = "*" # "~=3.13"
twine = "*"
WebTest = "~=2.0"
WebTest = "*" # "~=2.0"
wheel = "*"
yabs = "*"
# wsgidav = {editable = true, path = "."}
yabs = "*"

[packages]
defusedxml = "~=0.5"
defusedxml = "*" # "~=0.5"
Jinja2 = "*" # "~=2.10"
PyYAML = "~=5.1"
six = "~=1.13"
PyYAML = "*" # "~=5.1"
six = "*" # "~=1.13"
json5 = "*"

[requires]
Expand Down
93 changes: 62 additions & 31 deletions Pipfile.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 5 additions & 2 deletions setup.cfg
Expand Up @@ -127,11 +127,14 @@ omit =

[coverage:report]
precision = 2
show_missing = True
; show_missing = True
sort = Name
exclude_lines =
pragma: no cover
if __name__ == .__main__.:

[coverage:html]
directory = _build/coverage
directory = build/coverage

# --- PyTest Settings ----------------------------------------------------------

Expand Down
4 changes: 4 additions & 0 deletions tests/stressor/htdocs/temp/.gitignore
@@ -0,0 +1,4 @@
# Ignore everything in this directory
*
# Except this file
!.gitignore
2 changes: 1 addition & 1 deletion tests/stressor/test_rw.yaml
Expand Up @@ -14,7 +14,7 @@ config:
$ stressor run tests/stressor/test_rw -q
verbose: 3
base_url: http://127.0.0.1:8082
timeout: 1
request_timeout: 1

# Initial context value definitions.
# All used parameters must be listed here in the form:
Expand Down
32 changes: 22 additions & 10 deletions tox.ini
Expand Up @@ -21,14 +21,6 @@ usedevelop = True
extras =
test
passenv = LC_ALL LANG TRAVIS TRAVIS_BRANCH TRAVIS_OS_NAME TRAVIS_BUILD_ID
setenv =
COVERAGE_FILE=.coverage.{envname}
# Note: also honors .coveragerc:
commands =
# Run everything from /tests folder:
python -V
pip list
pytest -ra -v -x --cov=wsgidav --cov-report=xml --html=_build/pytest/report-{envname}.html --self-contained-html {posargs}
deps =
cheroot
defusedxml
Expand All @@ -42,19 +34,27 @@ deps =
redis
requests
webtest
setenv =
COVERAGE_FILE = .coverage.{envname}
commands =
# Run everything from /tests folder:
python -V
pip list
# Note: also honors .coveragerc:
pytest -ra -v -x --cov=wsgidav --durations=10 --html=build/pytest/report-{envname}.html --self-contained-html {posargs}


[testenv:coverage]
skip_install = true
deps =
coverage
setenv =
COVERAGE_FILE=.coverage
COVERAGE_FILE = .coverage
commands =
coverage erase
coverage combine
coverage html
coverage xml
; coverage xml
coverage report --fail-under=30.0


Expand Down Expand Up @@ -157,6 +157,18 @@ commands =
sphinx-build -b html sphinx sphinx-build


[testenv:stressor]
description =
Execute stressor test and benchmark
(Needs `wsgidav --root tests/stressor/htdocs/ --host 127.0.0.1 --port 8082 --auth anonymous --no-config -q`)
changedir = {toxinidir}
deps =
stressor
commands =
; stressor run tests/stressor/test_rw.yaml --single --max-errors=0 -q {posargs}
stressor -qq run tests/stressor/test_rw.yaml {posargs}


# [testenv:clean]
# commands =
# coverage erase
Expand Down

0 comments on commit 1d13249

Please sign in to comment.