2014-07-14 11:52:24 +00:00
|
|
|
# to run for a specific environment, use ``tox -e ENVNAME``
|
2011-08-17 19:23:20 +00:00
|
|
|
[tox]
|
2022-10-11 21:49:40 +00:00
|
|
|
envlist = py37,py38,py39,py310,pypy3,docs,plone
|
2022-08-13 12:41:37 +00:00
|
|
|
# Note: the 'docs' env creates a 'build' directory which may interfere in strange ways
|
|
|
|
# with the other environments. You might see this when you run the tests in parallel.
|
|
|
|
# See https://github.com/collective/icalendar/pull/359#issuecomment-1214150269
|
2011-08-17 19:23:20 +00:00
|
|
|
|
2013-12-24 12:26:13 +00:00
|
|
|
[testenv]
|
2022-08-07 21:57:35 +00:00
|
|
|
usedevelop=True
|
2013-10-29 17:43:46 +00:00
|
|
|
deps =
|
2014-05-29 16:56:10 +00:00
|
|
|
pytest
|
2013-12-24 12:06:03 +00:00
|
|
|
coverage
|
2022-10-10 16:28:39 +00:00
|
|
|
hypothesis
|
2013-12-24 12:06:03 +00:00
|
|
|
commands =
|
2017-02-05 20:36:33 +00:00
|
|
|
coverage run --source=src/icalendar --omit=*/tests/* --module pytest []
|
2014-05-29 16:56:10 +00:00
|
|
|
coverage report
|
|
|
|
coverage html
|
2022-06-24 11:34:45 +00:00
|
|
|
|
|
|
|
[testenv:docs]
|
|
|
|
deps =
|
|
|
|
-r {toxinidir}/requirements_docs.txt
|
2022-06-24 12:22:42 +00:00
|
|
|
changedir = docs
|
2022-08-13 09:12:58 +00:00
|
|
|
allowlist_externals = make
|
2022-06-24 11:34:45 +00:00
|
|
|
commands =
|
|
|
|
make html
|
2022-10-11 21:49:40 +00:00
|
|
|
|
|
|
|
[testenv:plone]
|
|
|
|
usedevelop = False
|
|
|
|
install = False
|
|
|
|
python = 3.10
|
|
|
|
commands_pre =
|
|
|
|
# Install Plone and explicitly the single package that uses icalendar, plus the test runner.
|
|
|
|
pip install Plone plone.app.event[test] zope.testrunner -c https://dist.plone.org/release/6.0-dev/constraints.txt
|
|
|
|
# Install the dev version of the package, mostly so we can safely point to the path with the tests.
|
2022-12-15 21:05:42 +00:00
|
|
|
pip install -e "git+https://github.com/plone/plone.app.event.git\#egg=plone.app.event"
|
2022-10-11 21:49:40 +00:00
|
|
|
# icalendar is pinned in the constraints, but we want the current dev version.
|
|
|
|
pip install -e {toxinidir}
|
|
|
|
commands =
|
|
|
|
zope-testrunner --test-path={envdir}/src/plone-app-event {posargs:-vc}
|