Remove some comments and improved changelog

This commit is contained in:
Bruno Oliveira 2016-07-25 18:39:00 -03:00
parent eb5b163698
commit 9cf09cda7b
2 changed files with 4 additions and 7 deletions

View File

@ -120,9 +120,10 @@ time or change existing behaviors in order to make them less surprising/more use
fixtures and reports them; fixtures and reports them;
+ ``--setup-show``: performs normal test execution and additionally shows + ``--setup-show``: performs normal test execution and additionally shows
setup and teardown of fixtures; setup and teardown of fixtures;
+ ``--keep-duplicates``: default behavior is now to ignore duplicate paths, you can + ``--keep-duplicates``: py.test now ignores duplicated paths given in the command
retain the old behavior and running multiple times the tests line. To retain the previous behavior where the same test could be run multiple
using the ``--keep-duplicates`` cli argument `#1609`_; times by specifying it in the command-line multiple times, pass the ``--keep-duplicates``
argument (`#1609`_);
Thanks `@d6e`_, `@kvas-it`_, `@sallner`_, `@ioggstream`_ and `@omarkohl`_ for the PRs. Thanks `@d6e`_, `@kvas-it`_, `@sallner`_, `@ioggstream`_ and `@omarkohl`_ for the PRs.

View File

@ -162,14 +162,10 @@ def pytest_ignore_collect(path, config):
return True return True
# Skip duplicate paths. # Skip duplicate paths.
# TODO: is this called when specifying direct filenames
# from command lines, eg.
# py.test test_a.py test_b.py
keepduplicates = config.getoption("keepduplicates") keepduplicates = config.getoption("keepduplicates")
duplicate_paths = config.pluginmanager._duplicatepaths duplicate_paths = config.pluginmanager._duplicatepaths
if not keepduplicates: if not keepduplicates:
if path in duplicate_paths: if path in duplicate_paths:
# TODO should we log this?
return True return True
else: else:
duplicate_paths.add(path) duplicate_paths.add(path)