diff --git a/CHANGELOG.rst b/CHANGELOG.rst index bef5abef8..abe528f7f 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -120,9 +120,10 @@ time or change existing behaviors in order to make them less surprising/more use fixtures and reports them; + ``--setup-show``: performs normal test execution and additionally shows setup and teardown of fixtures; - + ``--keep-duplicates``: default behavior is now to ignore duplicate paths, you can - retain the old behavior and running multiple times the tests - using the ``--keep-duplicates`` cli argument `#1609`_; + + ``--keep-duplicates``: py.test now ignores duplicated paths given in the command + line. To retain the previous behavior where the same test could be run multiple + 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. diff --git a/_pytest/main.py b/_pytest/main.py index ca77fdee4..9a4384cce 100644 --- a/_pytest/main.py +++ b/_pytest/main.py @@ -162,14 +162,10 @@ def pytest_ignore_collect(path, config): return True # 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") duplicate_paths = config.pluginmanager._duplicatepaths if not keepduplicates: if path in duplicate_paths: - # TODO should we log this? return True else: duplicate_paths.add(path)