Commit Graph

3373 Commits

Author SHA1 Message Date
Daniel Hahler 7f1af84f47 Merge master into features
Conflicts:
	src/_pytest/logging.py
2019-10-27 02:06:36 +01:00
Bruno Oliveira cefe6bfec3
Replace a few outdated references to py.test with pytest (#6063)
Replace a few outdated references to py.test with pytest
2019-10-26 12:59:22 -03:00
Bruno Oliveira 6f20b4b014 Introduce compat.fspath 2019-10-26 10:37:44 -03:00
Ran Benita 0b8c35516f Replace py.io.TextIO with io.StringIO
In Python3, py.io.TextIO is just an alias to io.StringIO. Remove the
indirection.
2019-10-26 16:33:57 +03:00
Ran Benita 96de232791 Replace a few outdated references to py.test with pytest 2019-10-26 16:28:17 +03:00
Bruno Oliveira f93f284356 Support sys.pycache_prefix on py38
Fix #4730
2019-10-26 10:17:21 -03:00
Kale Kundert b9df9a4761
Merge pull request #6058 from AnjoMan/6057-tolerance-on-complex-approx
6057 tolerance on complex approx
2019-10-25 15:31:47 -04:00
AnjoMan 34a02121ad Drop python 2 unicode tests for approx repr 2019-10-24 23:44:13 -04:00
AnjoMan ed9fda84d3 Add tolerance to complex numbers 2019-10-24 23:44:13 -04:00
Bruno Oliveira fb0e8b99d1 Merge remote-tracking branch 'upstream/master' into mm
Conflicts:
- 	src/_pytest/cacheprovider.py
2019-10-24 21:13:43 -03:00
Bruno Oliveira d1bc2601e4
pytester: align prefixes (#6026)
pytester: align prefixes
2019-10-24 18:50:29 -03:00
Daniel Hahler 8ef4287bf0 pytester: align prefixes
This is important for using another match_nickname, e.g. "re.match".

TODO:

- [ ] changelog
- [ ] test
2019-10-24 23:20:12 +02:00
Daniel Hahler 45fc0d9cd8
Merge pull request #6040 from blueyed/test_meta-slow
tests: mark test_meta as slow
2019-10-24 22:53:04 +02:00
Bruno Oliveira 432e5550e5
assertrepr_compare: use safeformat with -vv (#5936)
assertrepr_compare: use safeformat with -vv
2019-10-23 19:51:40 -03:00
Ran Benita 7a2d2d8f07
Merge pull request #5847 from bluetech/type-annotations-4
2/X Fix check_untyped_defs = True mypy errors
2019-10-23 22:52:23 +03:00
Daniel Hahler 6242777818
Merge pull request #6041 from blueyed/pytester-splitlines
pytester: runpytest_inprocess: use splitlines()
2019-10-23 21:42:21 +02:00
Bruno Oliveira 20ee883b5f
Show the mnemonic of pytest.ExitCode in RunResult's repr (#6043)
Show the mnemonic of pytest.ExitCode in RunResult's repr
2019-10-23 10:46:58 -03:00
Bruno Oliveira 7beb520555 Show the mnemonic of pytest.ExitCode in RunResult's repr
Fix #4901
2019-10-23 09:16:02 -03:00
Bruno Oliveira ba4b8c869c Review rm_rf handling of FileNotFoundErrors 2019-10-23 08:30:52 -03:00
Ran Benita 1787bffda0 Fix check_untyped_defs errors in capture 2019-10-23 14:20:15 +03:00
Ran Benita 1984c10427 Fix check_untyped_defs errors in doctest
In order to make the LiteralOutputChecker lazy initialization more
amenable to type checking, I changed it to match the scheme already used
in this file to lazy-initialize PytestDoctestRunner.
2019-10-23 14:20:14 +03:00
Daniel Hahler db9e248b2e
Merge pull request #6039 from blueyed/test_doctest_id
doctest: unset RUNNER_CLASS in pytest_unconfigure
2019-10-23 11:38:59 +02:00
Daniel Hahler 2f589a9769 pytester: runpytest_inprocess: use splitlines()
This avoids having a trailing empty lines always.
2019-10-23 04:34:29 +02:00
Daniel Hahler b079dc2dbe Fix test_doctest_set_trace_quit on features 2019-10-23 04:13:37 +02:00
Daniel Hahler 4af89bba9d
Merge pull request #5061 from blueyed/summary_stats-multi-color
Multiple colors with terminal summary_stats
2019-10-23 03:21:39 +02:00
Daniel Hahler 5e7b2ae704 doctest: pytest_unconfigure: reset RUNNER_CLASS
This is important when used with ``pytester``'s ``runpytest_inprocess``.

Since 07f20ccab `pytest testing/acceptance_test.py -k test_doctest_id`
would fail, since the second run would not consider the exception to be
an instance of `doctest.DocTestFailure` anymore, since the module was
re-imported, and use another failure message then in the short test
summary info (and in the report itself):

> FAILED test_doctest_id.txt::test_doctest_id.txt - doctest.DocTestFailure: <Do...

while it should be:

> FAILED test_doctest_id.txt::test_doctest_id.txt
2019-10-23 03:09:41 +02:00
Daniel Hahler 82e9013e73
Merge pull request #6004 from blueyed/fix-nf
cache: NFPlugin: keep known nodeids
2019-10-23 01:04:48 +02:00
Bruno Oliveira f4734213e5 Merge remote-tracking branch 'upstream/features' into blueyed/pdb-doctest-bdbquit 2019-10-22 19:43:35 -03:00
Daniel Hahler 0dd68ba0b6 tests: mark test_meta as slow
This moves it to the end of tests during collection.  Takes ~7s for me.
2019-10-22 23:44:52 +02:00
Daniel Hahler 554dba391c Multiple colors with terminal summary_stats
Ref: https://github.com/pytest-dev/pytest/issues/5060
2019-10-21 04:35:45 +02:00
Daniel Hahler 803cc1f294 Merge master into features 2019-10-21 00:08:03 +02:00
Daniel Hahler d91ff0af8a assertrepr_compare: use safeformat with -vv 2019-10-20 20:51:03 +02:00
Daniel Hahler 0123b29ed7 tests: remove unnecessary test, clarify
Follow-up to https://github.com/pytest-dev/pytest/pull/6009.
2019-10-20 20:40:13 +02:00
Bruno Oliveira 16efa1bfef
Merge pull request #6009 from yoavcaspi/fix_keyboardInterrupt_on_setup_show
setuponly: remove printing out/err from capman
2019-10-20 14:00:06 -03:00
Daniel Hahler fbb7f663be
Merge pull request #6005 from blueyed/harden-trial
tests: harden/fix test_trial_error
2019-10-20 17:35:15 +02:00
Yoav Caspi 5624e366c1 add more indications to the result of the tests 2019-10-20 09:54:23 +03:00
Anthony Sottile 3a402811de Ensure .pytest_cache file has a newline at the end 2019-10-19 14:42:06 -07:00
Bruno Oliveira b5579d2cf2
Make InvocationParams.args a tuple (#6008)
Make InvocationParams.args a tuple
2019-10-19 17:36:42 -03:00
Bruno Oliveira d12cdd3127 Make InvocationParams.args a tuple
This avoids mutating the original list to reflect on InvocationParams,
which is supposed to be an immutable snapshot of the state of pytest.main()
at the moment of invocation (see pytest-dev/pytest-xdist#478).
2019-10-19 16:42:58 -03:00
Yoav Caspi e05b33ed16 setuponly: remove printing out/err from capman 2019-10-19 22:33:19 +03:00
Daniel Hahler 15f9568694 Improve/revisit CallInfo.__repr__ 2019-10-19 19:07:11 +02:00
Daniel Hahler 5b88612e5b tests: harden/fix test_trial_error 2019-10-19 09:03:26 +02:00
Daniel Hahler 3173a26388 cache: NFPlugin: keep known nodeids
Caveat: does not forget about old nodeids

Fixes https://github.com/pytest-dev/pytest/issues/5206
2019-10-19 04:53:01 +02:00
Daniel Hahler 0976e2f50d Merge master into features 2019-10-18 17:51:42 +02:00
Daniel Hahler 7ef44913a1 tests: debugging: disable pdb++ within inner tests
Ref: https://github.com/pytest-dev/pytest/pull/5306#issuecomment-495690643
2019-10-18 17:08:39 +02:00
Daniel Hahler 90dfee5da5 tests: keep numpy being optional
Ref: https://github.com/pytest-dev/pytest/pull/5950#discussion_r335254774
2019-10-16 23:50:23 +02:00
Bruno Oliveira 914a9465ab
tests: move tests for setuponly/setupplan (#5961)
tests: move tests for setuponly/setupplan
2019-10-15 19:49:26 -03:00
Daniel Hahler c2ae0e0dc6 tests: move tests for setuponly/setupplan
Forgotten in 032ce8baf.
2019-10-15 00:41:05 +02:00
Daniel Hahler 361f0e6ba7 minor: test_failure_function: use vars 2019-10-14 22:45:25 +02:00
Victor Maryama 63e3d89647 Fixed linting. 2019-10-12 15:08:47 +02:00