Commit Graph

12158 Commits

Author SHA1 Message Date
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
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 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
Ran Benita 2aa5436ee7 Remove Python 2 compat code in test_juintxml.py 2020-04-09 17:33:55 +03:00
Ran Benita 5a5fd01ebe Skip flaky test test_faulthandler.py::test_timeout[True]
It occasionally crashes on CI, the reason seems out of our control, or
at least we can't figure it out.
2020-04-09 17:23:54 +03:00
Ran Benita 08b3d37177 Remove Python 2 compat check in test_monkeypatch.py
Presumably it used to test old-style vs. new-style classes, but in
the Python 3 conversion SampleNew and SampleOld became the same.
2020-04-09 17:11:18 +03:00
Ran Benita 8fab3dd42f Remove broken _reprcompare disabling fixture in test_assertrewrite.py
The `_pytest._code._reprcompare` that was referred to previously doesn't
exist -- it was moved to other places but wasn't updated. This regressed
in f423ce9c01. Now we don't want it
anymore, so keep the status quo by explicitly removing them.
2020-04-09 10:47:45 +03:00
Daniel Hahler 413ca8a4d0
faulthandler: trylast=True (#7025)
It should happen as late as possible before the test runs.

Ref: https://github.com/pytest-dev/pytest/issues/7022
2020-04-09 08:53:35 +02:00
Ran Benita eb00182061
Merge pull request #7047 from bluetech/rm-test_assertion-abc
Remove some no-longer-needed compat code in test_assertion
2020-04-08 22:33:19 +03:00
Ran Benita 20956b2f4e Remove some no-longer-needed compat code in test_assertion 2020-04-08 21:35:42 +03:00
Ran Benita 272be7ef74
Merge pull request #7039 from bluetech/markdecorator-doc
Slightly improve Mark and MarkDecorator documentation
2020-04-08 20:36:42 +03:00
Daniel Hahler 7048d5be9c
Fix FD leak in test__get_multicapture (#7037)
Instantiating `FDCapture` creates a file descriptor already.  Use "no"
to not leak a fd here.
2020-04-08 18:11:31 +02:00
Daniel Hahler 4fd2623c12
tests: fix TypeErrors (#7038)
* tests: fix TypeError with test_mark_closest

It fails when trying to run it actually:

> TypeError: test_has_inherited() takes 0 positional arguments but 1 was given

* Fix testing/test_collection.py::TestCollector::test_getparent
2020-04-08 18:11:04 +02:00
Ran Benita 4344c61731 Slightly improve Mark and MarkDecorator documentation
Mostly I wanted to get rid of mentions of "MarkItem" which is something
that no longer exists, but I improved a little beyond that and annotated
some simple types.
2020-04-07 22:14:47 +03:00
Ran Benita 6356583eab
Merge pull request #7036 from pytest-dev/revert-7030-increase-test_timeout-timeout
Revert "Increase test_faulthandler.py::test_timeout sleep duration on CI"
2020-04-07 13:42:51 +03:00
Ran Benita eab0a6e34d Revert "Increase test_faulthandler.py::test_timeout sleep duration on CI" 2020-04-07 13:20:35 +03:00
Daniel Hahler ce806001b0
Fix doc for `numbered` arg with `TempPathFactory.mktemp` (#7014) 2020-04-07 11:44:54 +02:00
Ran Benita 259e5d0610
Merge pull request #7034 from bluetech/fix-testdurations-flaky
Fix flaky TestDurations test
2020-04-07 09:39:02 +03:00
Daniel Hahler 1fd14685c5
doc: document inversed lines with terminal report hooks (#7016)
It was surprising that `tryfirst=True` would not result in lines being
added to the beginning with `pytest_report_header`.
This is due to lines being reversed, and therefore the same applies to
`pytest_report_collectionfinish`.
2020-04-07 08:08:28 +02:00
Daniel Hahler bf3e64d473
Remove TestExecutionForked - xdist.boxed has gone since long (#7021)
Tried to write a test using `--boxed`, but it fails due to
https://github.com/pytest-dev/pytest-forked/issues/30.
2020-04-07 08:07:20 +02:00
Daniel Hahler 3a4435fb59
doc: fix/remove leftovers from removing `versionadded` (#7028)
Ref: 9c5da9c (https://github.com/pytest-dev/pytest/pull/5184)
2020-04-07 08:01:50 +02:00
Ran Benita c659a6b917
Merge pull request #7030 from bluetech/increase-test_timeout-timeout
Increase test_faulthandler.py::test_timeout sleep duration on CI
2020-04-07 00:06:16 +03:00
Ran Benita c3e6e2e8c8 Fix flaky TestDurations test
TestDurations tests the `--durations=N` functionality which reports N
slowest tests, with durations <= 0.005s not shown by default.

The test relies on real time.sleep() (in addition to the code which uses
time.perf_counter()) which makes it flaky and inconsistent between
platforms.

Instead of trying to tweak it more, make it use fake time instead. The
way it is done is a little hacky but seems to work.
2020-04-06 23:49:46 +03:00
Ran Benita 7da3e3aaad Increase test_faulthandler.py::test_timeout sleep duration on CI
This might help fix some flakiness.
2020-04-06 11:55:03 +03:00
Ran Benita cb06bc7d6e
Merge pull request #7017 from bluetech/doc-pytest_report_teststatus
Document the pytest_report_teststatus hook better and test uncovered functionality
2020-04-04 18:45:50 +03:00
Ran Benita 1ce30fd38f Document the pytest_report_teststatus hook better and test uncovered functionality
This hook has some functionality to provide explicit markup for the test
status. It seemed unused and wasn't tested, so I was tempted to remove
it, but I found that the pytest-rerunfailures plugin uses it, so
document it and add a test instead.
2020-04-04 17:27:59 +03:00