Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge master into features #4833

Merged
merged 13 commits into from
Feb 26, 2019
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
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ after_success:
coverage combine
coverage xml --ignore-errors
coverage report -m --ignore-errors
bash <(curl -s https://codecov.io/bash) -Z -X gcov -X coveragepy -X search -X xcode -X gcovout -X fix -f coverage.xml -F "${TOXENV//-/,},linux"
bash <(curl -s https://codecov.io/bash) -Z -X gcov -X coveragepy -X search -X xcode -X gcovout -X fix -f coverage.xml -F $TRAVIS_OS_NAME
fi

notifications:
Expand Down
4 changes: 2 additions & 2 deletions doc/en/customize.rst
Original file line number Diff line number Diff line change
Expand Up @@ -133,8 +133,8 @@ progress output, you can write it into a configuration file:

.. code-block:: ini

# content of pytest.ini
# (or tox.ini or setup.cfg)
# content of pytest.ini or tox.ini
# setup.cfg files should use [tool:pytest] section instead
[pytest]
addopts = -ra -q

Expand Down
4 changes: 2 additions & 2 deletions doc/en/goodpractices.rst
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ Conventions for Python test discovery
* In those directories, search for ``test_*.py`` or ``*_test.py`` files, imported by their `test package name`_.
* From those files, collect test items:

* ``test_`` prefixed test functions or methods outside of class
* ``test_`` prefixed test functions or methods inside ``Test`` prefixed test classes (without an ``__init__`` method)
* ``test`` prefixed test functions or methods outside of class
* ``test`` prefixed test functions or methods inside ``Test`` prefixed test classes (without an ``__init__`` method)

For examples of how to customize your test discovery :doc:`example/pythoncollection`.

Expand Down
6 changes: 4 additions & 2 deletions doc/en/mark.rst
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,11 @@ which also serve as documentation.
Raising errors on unknown marks: --strict
-----------------------------------------

When the ``--strict`` command-line flag is passed, any marks not registered in the ``pytest.ini`` file will trigger an error.
When the ``--strict`` command-line flag is passed, any unknown marks applied
with the ``@pytest.mark.name_of_the_mark`` decorator will trigger an error.
Marks defined or added by pytest or by a plugin will not trigger an error.

Marks can be registered like this:
Marks can be registered in ``pytest.ini`` like this:

.. code-block:: ini

Expand Down
7 changes: 5 additions & 2 deletions doc/en/reference.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1226,8 +1226,11 @@ passed multiple times. The expected format is ``name=value``. For example::

.. confval:: markers

List of markers that are allowed in test functions, enforced when ``--strict`` command-line argument is used.
You can use a marker name per line, indented from the option name.
When the ``--strict`` command-line argument is used, only known markers -
defined in code by core pytest or some plugin - are allowed.
You can list additional markers in this setting to add them to the whitelist.

You can list one marker name per line, indented from the option name.

.. code-block:: ini

Expand Down
2 changes: 1 addition & 1 deletion scripts/upload-coverage.bat
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ if not defined PYTEST_NO_COVERAGE (
C:\Python36\Scripts\coverage combine
C:\Python36\Scripts\coverage xml --ignore-errors
C:\Python36\Scripts\coverage report -m --ignore-errors
scripts\appveyor-retry C:\Python36\Scripts\codecov --required -X gcov pycov search -f coverage.xml --flags %TOXENV:-= % windows
scripts\appveyor-retry C:\Python36\Scripts\codecov --required -X gcov pycov search -f coverage.xml --flags windows
) else (
echo Skipping coverage upload, PYTEST_NO_COVERAGE is set
)
1 change: 1 addition & 0 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ commands =
deps =
{[testenv]deps}
twisted
unittest2
commands =
{env:_PYTEST_TOX_COVERAGE_RUN:} pytest {posargs:testing/test_unittest.py}

Expand Down