Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ Change log
2.2 (unreleased)
----------------

- Add tox option ``testenv-skip-test-extra``.
Set this to true if your package does not have a ``test`` extra.
Otherwise tests fail with latest ``tox``.

- Remove special treatment for macOS test runners on GitHub

- Print out a warning if a ``setuptools`` install time dependency is found
Expand Down
4 changes: 4 additions & 0 deletions docs/narr.rst
Original file line number Diff line number Diff line change
Expand Up @@ -458,6 +458,10 @@ testenv-additional-extras
Additional entries for the ``extras`` option in ``[testenv]`` of
``tox.ini``. This option has to be a list of strings without indentation.

testenv-skip-test-extra
Don't add the standard ``test`` in the ``extras`` option in ``[testenv]``
of ``tox.ini``. This option has to be true/false. Default is false.

testenv-commands-pre
Replacement for the default ``commands_pre`` option in ``[testenv]`` of
``tox.ini``. This option has to be a list of strings without indentation.
Expand Down
3 changes: 3 additions & 0 deletions src/zope/meta/config_package.py
Original file line number Diff line number Diff line change
Expand Up @@ -462,6 +462,8 @@ def tox(self):
testenv_additional = self.tox_option('testenv-additional')
testenv_additional_extras = self.tox_option(
'testenv-additional-extras')
testenv_skip_test_extra = self.tox_option(
'testenv-skip-test-extra', False)
testenv_commands_pre = self.tox_option('testenv-commands-pre')
testenv_commands = self.tox_option('testenv-commands')
testenv_setenv = self.tox_option('testenv-setenv')
Expand Down Expand Up @@ -503,6 +505,7 @@ def tox(self):
lint_diff_on_failure=lint_diff_on_failure,
testenv_additional=testenv_additional,
testenv_additional_extras=testenv_additional_extras,
testenv_skip_test_extra=testenv_skip_test_extra,
testenv_commands=testenv_commands,
testenv_commands_pre=testenv_commands_pre,
testenv_deps=testenv_deps,
Expand Down
2 changes: 2 additions & 0 deletions src/zope/meta/default/tox-testenv.j2
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,9 @@ commands =
sphinx-build -b doctest -d {envdir}/.cache/doctrees docs {envdir}/.cache/doctest
{% endif %}
extras =
{% if not testenv_skip_test_extra %}
test
{% endif %}
{% if with_sphinx_doctests %}
docs
{% endif %}
Expand Down