diff --git a/.travis.yml b/.travis.yml index 8c6342ccc..ba2ba37f2 100644 --- a/.travis.yml +++ b/.travis.yml @@ -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: diff --git a/doc/en/customize.rst b/doc/en/customize.rst index 310b5c7b3..2329ec2d1 100644 --- a/doc/en/customize.rst +++ b/doc/en/customize.rst @@ -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 diff --git a/doc/en/goodpractices.rst b/doc/en/goodpractices.rst index ba79e71f4..f08bd5c40 100644 --- a/doc/en/goodpractices.rst +++ b/doc/en/goodpractices.rst @@ -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`. diff --git a/doc/en/mark.rst b/doc/en/mark.rst index d5c5c5735..e841a6780 100644 --- a/doc/en/mark.rst +++ b/doc/en/mark.rst @@ -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 diff --git a/doc/en/reference.rst b/doc/en/reference.rst index 24d5f7975..1ed5d91b1 100644 --- a/doc/en/reference.rst +++ b/doc/en/reference.rst @@ -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 diff --git a/scripts/upload-coverage.bat b/scripts/upload-coverage.bat index 8a8d94c98..7391f817c 100644 --- a/scripts/upload-coverage.bat +++ b/scripts/upload-coverage.bat @@ -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 ) diff --git a/tox.ini b/tox.ini index 59879ead3..87a56f842 100644 --- a/tox.ini +++ b/tox.ini @@ -83,6 +83,7 @@ commands = deps = {[testenv]deps} twisted + unittest2 commands = {env:_PYTEST_TOX_COVERAGE_RUN:} pytest {posargs:testing/test_unittest.py}