Commit Graph

12348 Commits

Author SHA1 Message Date
Ran Benita be68496440
Merge pull request #7134 from bluetech/rm-dupfile
config: replace usage of py.io.dupfile
2020-04-30 14:07:52 +03:00
Ran Benita c72a1b2933 config: replace usage of py.io.dupfile
As part of the effort to remove uses of `py`.
2020-04-29 18:04:37 +03:00
Ran Benita e5d6e58625
Merge pull request #7130 from bluetech/cacheprovider-nf-set
cacheprovider: speed up NFPlugin when --nf is not enabled
2020-04-29 17:28:20 +03:00
Ran Benita 077d1c3502
Merge pull request #7129 from bluetech/testing-cache-writefail-warning
testing: fix warning issued by test_cache_writefail_cachfile_silent
2020-04-29 16:00:43 +03:00
Ran Benita 4a42afdc2f cacheprovider: speed up NFPlugin when --nf is not enabled
The code used an O(n^2) loop. Replace list with set to make it O(n).

For backward compatibility the filesystem cache still remains a list.

On this test:

    import pytest
    @pytest.mark.parametrize("x", range(5000))
    def test_foo(x): pass

run with `pytest --collect-only`:

Before: 0m1.251s
After:  0m0.921s
2020-04-29 13:02:38 +03:00
Anthony Sottile dd49812dae
Merge pull request #7131 from ArtyomKaltovich/patch-1
update doctests.rst regarding issue #7116
2020-04-28 13:59:25 -07:00
ArtyomKaltovich bef263ee76
update doctests.rst regarding issue #7116
https://github.com/pytest-dev/pytest/issues/7116
2020-04-28 23:04:58 +03:00
Ran Benita 49e50d3106 testing: fix warning issued by test_cache_writefail_cachfile_silent
Remove this message which was shown in the warning summary of pytest's
own testsuite:

    testing/test_cacheprovider.py::TestNewAPI::test_cache_writefail_cachfile_silent
      testing/test_cacheprovider.py:40: PytestCacheWarning: could not create cache path /tmp/pytest-of-ran/pytest-2/test_cache_writefail_cachfile_silent0/.pytest_cache/v/test/broken
        cache.set("test/broken", [])
2020-04-28 22:49:00 +03:00
Ran Benita 9bf3efb8e9
Merge pull request #7120 from bluetech/update-dev
pre-commit: update some tool revisions
2020-04-25 23:07:15 +03:00
Ran Benita 9828cfa339
Merge pull request #7117 from bluetech/deprecate-fillfuncargs-v2
fixtures: deprecate pytest._fillfuncargs function
2020-04-24 22:59:06 +03:00
Ran Benita 3cd97d50f9 pre-commit: update pyupgrade 1.18.0 -> 2.2.1 2020-04-24 21:57:38 +03:00
Ran Benita 23881ad592 pre-commit: update pre-commit-hooks 2.2.3 -> 2.5.0 2020-04-24 21:53:40 +03:00
Ran Benita 38c9d59ddc pre-commit: update blacken-docs 1.0.0 -> 1.6.0 2020-04-24 21:53:37 +03:00
Ran Benita 289e6c1d36
Update src/_pytest/deprecated.py
Co-Authored-By: Ronny Pfannschmidt <opensource@ronnypfannschmidt.de>
2020-04-24 21:37:08 +03:00
Ran Benita cbca9f1def
Merge pull request #7118 from bluetech/ignore-collect-directory-warning
testing: avoid pytest_collect_directory message in warning summary
2020-04-24 21:34:29 +03:00
Ran Benita e269407e65 testing: avoid pytest_collect_directory message in warnings summary
Currently this test issues a warning which is displayed in the warning
summary (of pytest's own test suite):

  testing/acceptance_test.py::TestGeneralUsage::test_early_skip
    /tmp/pytest-of-ran/pytest-396/test_early_skip0/conftest.py:2: PytestDeprecationWarning: The pytest_collect_directory hook is not working.
    Please use collect_ignore in conftests or pytest_collection_modifyitems.
      def pytest_collect_directory():

I think the filter was meant to be `ignore` in the first place, and not
`always` which is not a valid action AFAIK.
2020-04-24 19:06:31 +03:00
Ran Benita 907e29a47b fixtures: deprecate pytest._fillfuncargs function
This function is exposed and kept alive for the oejskit plugin which is
abandoned and no longer works with recent plugins, so let's prepare to
completely remove it.
2020-04-24 18:54:46 +03:00
Ran Benita 7d5f5a8785
Merge pull request #7050 from blueyed/fix-doc
doc: internal: remove references to old "newinterpret" module
2020-04-17 17:11:31 +03:00
Ran Benita 731c340be6
Merge pull request #7058 from blueyed/doc-store
doc: minor fixes for Store
2020-04-17 17:10:35 +03:00
Katarzyna Król 7789b51acb
Issue 4677 - always relative path in skip report (#6953) 2020-04-17 08:28:36 +03:00
Simon K de6c28ed1f
Improve error handling around yieldctx fixtures which do not yield a value (#7083) 2020-04-15 12:17:13 +03:00
Ran Benita 9f4e680403
Merge pull request #7089 from bluetech/rm-tox-pypy
Remove pypy (2) environment from tox.ini
2020-04-14 15:42:39 +03:00
Ran Benita 10080dc60d Remove pypy (2) environment from tox.ini
pypy refers to Pypy 2 which implements Python 2 which pytest does not
support. Keep only pypy3.
2020-04-14 14:49:12 +03:00
Ran Benita 9ddf38369d
Merge pull request #7069 from bluetech/faulthandler-doc-windows
Remove note saying faulthandler_timeout is not available on Windows
2020-04-14 10:24:28 +03:00
Simon K f479cbce10
Document pytester fixtures so --fixtures makes more sense (#7080) 2020-04-13 20:58:50 +03:00
Ran Benita c08cff3770
Merge pull request #7082 from symonk/4583-better-ux-with-eval-fails
Gracefully handle eval() failure(s) for marker expressions
2020-04-13 17:03:37 +03:00
Ran Benita 798361ab9f
Merge pull request #7078 from andy-maier/andy/add-docs-repr_failure
Fixes #7077: Added & improved docs for repr_failure() in Node & Collector
2020-04-13 16:38:14 +03:00
Simon K 6fd30134d3
Update changelog/4583.bugfix.rst
Co-Authored-By: Ran Benita <ran@unusedvar.com>
2020-04-13 14:29:59 +01:00
symonk 251e8f212e refactor mark tests, widen catching and make error msg more concise 2020-04-13 14:25:01 +01:00
symonk 87edc09dea Gracefully handle eval() failure(s) for marker expressions 2020-04-13 13:25:06 +01:00
Andreas Maier c9386ada29 Squash: Resolved 2nd round of review comments 2020-04-12 13:19:45 +02:00
Andreas Maier b2582b0314 Squash: Applied review comments 2020-04-12 12:12:00 +02:00
Andreas Maier 869c089887 Fixes #7077: Added & improved docs for repr_failure() in Node & Collector 2020-04-12 09:28:40 +02:00
gaurav dhameeja 5703fdbbdc Fix-6911(pytest-bot): Added error from commands that are run
Earlier pytest-bot would only print out the exception in cases of
failure but did not provide context on failing command and error from
command. This patch adds the errors from the command to the exception
message.
`Command` provides abstraction over the command to run and helps
in collecting errors from the first failing command only.
With this, we don't need to check `returncode` from each command that
we run, we can run all the commands and will have access to the error
from the first command that failed. This pattern was taken from Go.
Please refer: https://blog.golang.org/errors-are-values
2020-04-12 02:31:51 +05:30
Bruno Oliveira f214a4be97
Merge pull request #7072 from pytest-dev/asottile-patch-1
Remove asottile from TIDELIFT.rst
2020-04-10 19:45:59 -03:00
Anthony Sottile c8fc4c5edc
Remove asottile from TIDELIFT.rst 2020-04-10 15:38:45 -07:00
Bruno Oliveira 6daf3614f0
Merge pull request #7070 from nicoddemus/remove-bruno
Remove myself from tidelift
2020-04-10 18:37:30 -03:00
Bruno Oliveira 4b634ac758 Remove myself from tidelift 2020-04-10 10:47:25 -03:00
Ran Benita b553ce54c8 Remove note saying faulthandler_timeout is not available on Windows
I think it is available in all Python versions we support, but at least
since Python 3.7 the docs[0] say:

    Changed in version 3.7: This function is now always available.

so let's just remove the note.

[0] https://docs.python.org/3/library/faulthandler.html#faulthandler.dump_traceback_later
2020-04-10 14:46:15 +03:00
Ronny Pfannschmidt 244c8e4a13
Merge pull request #6680 from RonnyPfannschmidt/fix-6294-more-docs-for-fromparent
doc: more docs for from_parent
2020-04-10 13:10:40 +02:00
Ran Benita df66a953a1
Merge pull request #7048 from bluetech/fix-test_assertrewrite-reprcompare
Remove broken _reprcompare disabling fixture in test_assertrewrite.py
2020-04-10 12:51:11 +03:00
Ran Benita 9ffccf5acc
Merge pull request #7055 from bluetech/rm-test_juintxml-unichr
Remove Python 2 compat code in test_juintxml.py
2020-04-10 11:52:45 +03:00
Ran Benita f0d1ccd32f
Merge pull request #7056 from bluetech/rm-test_monkeypatch-oldstyleclass
Remove Python 2 compat check in test_monkeypatch.py
2020-04-10 11:52:01 +03:00
Ran Benita 41d1ecf521
Merge pull request #7057 from bluetech/skip-faulthandler-test_timeout
Skip flaky test test_faulthandler.py::test_timeout[True]
2020-04-10 11:51:31 +03:00
Ronny Pfannschmidt 19c243f0fa
Merge pull request #6285 from earonesty/patch-1
Add _pytest.fixtures.FixtureLookupError to top level import
2020-04-10 07:58:58 +02:00
Ronny Pfannschmidt c5d636a1b2
Merge pull request #6992 from pytest-dev/revert-6767-tmpdir-cleanup-upstream
Revert "tmpdir: clean up indirection via config for factories"
2020-04-10 07:49:52 +02:00
Ronny Pfannschmidt 1eb2b45db5 Revert "tmpdir: clean up indirection via config for factories (#6767)"
This reverts commit 8a1633c3b4.

+ add changelog
2020-04-10 07:18:54 +02:00
Daniel Hahler 0b5d2ff526 Fix/improve printing of docs for collected items 2020-04-09 21:49:30 +02:00
Daniel Hahler accea46fa1 doc: minor fixes for Store 2020-04-09 17:08:47 +02:00
Daniel Hahler f136b79f1a
Fix test_no_warnings to handle e.g. `_pytest.async` (#7044)
Before this patch it would result in a SyntaxError with e.g. `import _pytest.async`.
2020-04-09 16:56:01 +02:00