Commit Graph

2811 Commits

Author SHA1 Message Date
Bruno Oliveira eb92e57509 Show deprecation message when running under Python 2.7 and 3.4
Fix #4627
2019-01-29 19:02:41 -02:00
Bruno Oliveira 9905a73ae0
Merge pull request #4511 from jhunkeler/junit-strict
Toggle JUnit behavior with INI option
2019-01-24 20:54:32 -02:00
Bruno Oliveira 51dd738b1a
Merge pull request #4673 from kown7/count-tests
Count tests
2019-01-24 20:46:29 -02:00
Kristoffer Nordstroem 6d38868950 fix tests by adding additional output to expected responses 2019-01-24 00:08:43 +01:00
Bruno Oliveira daf39112e7
Merge pull request #4091 from nicoddemus/setup-methods-as-fixtures-3094
Use fixtures to invoke xunit-style fixtures
2019-01-23 19:23:31 -02:00
Joseph Hunkeler 4ecf29380a
Adds xunit2 version of test_record_attribute 2019-01-14 22:58:41 -05:00
Joseph Hunkeler af2ee1e80a
Emit JUnit compatible XML
* Remove non-standard testcase elements: 'file' and 'line'
* Replace testcase element 'skips' with 'skipped'
* Time resolution uses the standard format: 0.000
* Tests use corrected XML output with proper attributes
2019-01-14 22:58:40 -05:00
Daniel Hahler 1a358df998 Merge master into features 2019-01-14 17:15:39 +01:00
Anthony Sottile 5bb0be1e24
Merge pull request #4615 from asottile/some_dead_code
Remove some dead code
2019-01-14 07:35:21 -08:00
Anthony Sottile 16546b7342 Remove some dead code
- I wrote a thing: https://github.com/asottile/dead
- wanted to try it out, there's lots of false positives and I didn't look
  through all the things it pointed out but here's some
2019-01-13 20:41:30 -08:00
Bruno Oliveira 3efb26ae7f
Merge pull request #4632 from AnjoMan/dont-rewrite-objects-with-failing-getattr
Assertion rewrite breaks for objects that reimplement `__getattr__`
2019-01-11 14:07:22 -02:00
Anton Lodder acb3e8e8a7 Test rewriting assertion when __name__ fails
Pytest rewrites assertions so that the items on each
side of a comoparison will have easier-to-read names
in case of an assertion error.

Before doing this, it checks to make sure the object
doesn't have a __name__ attribute; however, it uses
`hasattr` so if the objects __getattr__ is broken then
the test failure message will be the stack trace
for this failure instead of a rewritten assertion.
2019-01-10 20:45:15 -05:00
Bruno Oliveira 5f16ff3acc
Merge pull request #4212 from RonnyPfannschmidt/doctest-testmod-has-call
Doctest: hack in handling mock style objects
2019-01-10 19:13:45 -02:00
Bruno Oliveira 71a745270a
Merge pull request #4607 from oscarbenjamin/long_output
Show full repr with assert a==b and -vv
2019-01-10 12:30:46 -02:00
Bruno Oliveira 0f918b1a9d xunit-style functions and methods are invoked by autouse fixtures
Fix #3094, Fix #517
2019-01-10 12:10:04 -02:00
Ronny Pfannschmidt a6988aa0b9 fix doctest module when a mock object is around
fixes #3456
2019-01-10 12:50:22 +01:00
Bruno Oliveira e4a21b11d5 Change test_warningschecker_twice to a unittest 2019-01-09 18:58:51 -02:00
Victor Maryama 948a5d5ac6 Added test for Issue 4617 2019-01-09 12:31:26 +01:00
Oscar Benjamin 85055a9efe Show full repr with assert a==b and -vv 2019-01-08 01:25:05 +00:00
Pedro Algarvio be7eb22e88
Add test case for `importorskip` custom reason 2019-01-04 19:06:23 +00:00
Jeffrey Rackauckas 1eef53b6fe Update --collect-only to display test descriptions when ran in verbose mode. 2018-12-29 22:46:46 -08:00
Ronny Pfannschmidt 9f9f6ee48b remove most of markertransfer
keywords are still a big issue
2018-12-21 14:02:38 +01:00
Bruno Oliveira c378cb4793 Remove support for applying marks to values in parametrize
Fix #3082
2018-12-20 16:16:13 -02:00
Ronny Pfannschmidt d888d5c933
Merge pull request #4565 from nicoddemus/flaky-test
Use mocking to make test_junit_duration_report deterministic
2018-12-20 08:52:34 +01:00
Bruno Oliveira a93f41233a Raise an error if pytest_plugins is defined in a non-top-level conftest.py file
Fix #4548
2018-12-19 18:09:47 -02:00
Bruno Oliveira 9138419379 Remove support for '[pytest]' section in setup.cfg file
Fix #3086
2018-12-19 17:43:17 -02:00
Bruno Oliveira 197fd69ddc Use mocking to make test_junit_duration_report deterministic
Fix #4563
2018-12-19 17:13:12 -02:00
Bruno Oliveira 0115766df3 Calling fixtures directly is now an error instead of a warning
Fix #4545
2018-12-19 09:26:29 -02:00
Bruno Oliveira 8563364d8b
Merge pull request #4542 from nicoddemus/remove-legacy-warn
Remove config.warn, Node.warn and pytest_logwarning
2018-12-18 19:11:36 -02:00
Ronny Pfannschmidt e63c7a13ff
Merge pull request #4327 from ndevenish/approx
Let approx() work on more generic sequences
2018-12-17 15:21:12 +01:00
Bruno Oliveira b7e8171cf8
Merge branch 'features' into remove-legacy-warn 2018-12-17 10:37:31 -02:00
Bruno Oliveira 75e93e5168
Merge pull request #4556 from nicoddemus/idfunc-failure
Errors in parametrize id functions now propagate the error instead of issuing a warning
2018-12-17 10:36:15 -02:00
Bruno Oliveira c6d27d8224
Merge pull request #4555 from nicoddemus/remove-record-xml-pytest-main-str
Remove record_xml_property and support for strings in pytest.main()
2018-12-17 10:08:51 -02:00
Bruno Oliveira 84390acccc
Merge pull request #4553 from nicoddemus/junit-durations
Rename "junit_time" to "junit_duration_report" option
2018-12-17 10:08:20 -02:00
Bruno Oliveira 1499778d5e Errors in parametrize id functions now propagate the error instead of issuing a warning
Fix #2169
2018-12-14 21:07:54 -02:00
Bruno Oliveira a7e401656e Remove support to pass strings to pytest.main()
Fix #3085
2018-12-14 15:45:47 -02:00
Daniel Hahler 8e287c5c77 Merge master into features 2018-12-14 16:44:43 +01:00
Bruno Oliveira 231863b133 Rename "junit_time" to "junit_duration_report" option
Just realized while reading the changelog that "junit_time" is not a very good
name, so I decided to open this PR renaming it to "junit_duration_report" which
I believe conveys the meaning of the option better
2018-12-14 12:56:26 -02:00
Bruno Oliveira fd48cd57f9 Remove config.warn, Node.warn; pytest_logwarning issues a warning when implemented
Fix #3078
2018-12-14 12:50:18 -02:00
Bruno Oliveira 1e80a9cb34 Remove pytest_funcarg__ prefix support for defining fixtures
Fix #4543
2018-12-13 21:41:38 -02:00
Bruno Oliveira 26d202a7bd
Merge pull request #4529 from aparamon/jxmlunit-call-time
Add --junittime=call option
2018-12-13 13:51:06 -02:00
Bruno Oliveira b390c66dc4
Merge pull request #4292 from blueyed/exit-outcome
Derive outcomes.exit.Exit from SystemExit instead of KeyboardInterrupt
2018-12-13 13:43:39 -02:00
Bruno Oliveira f96e1b6f3e
Merge pull request #4532 from nicoddemus/failure-summary
Change -ra to show errors and failures last, instead of first
2018-12-13 10:30:28 -02:00
Bruno Oliveira 5b83417afc Deprecate the 'message' parameter of pytest.raises
Fix #3974
2018-12-12 22:26:30 -02:00
Anthony Sottile a254ad0436 Raise `TypeError` for `with raises(..., match=<non-None falsey value>)`. 2018-12-12 14:59:22 -08:00
Daniel Hahler 6af674a3ac
Merge pull request #4520 from blueyed/PYTEST_DISABLE_PLUGIN_AUTOLOAD-del
tests: fix tests that require PYTEST_DISABLE_PLUGIN_AUTOLOAD to be unset
2018-12-12 18:40:46 +01:00
Bruno Oliveira e3d30f8ebf Remove deprecated PyCollector.makeitem
Fix #4535
2018-12-12 14:15:52 -02:00
Andrey Paramonov 5d79baf3f8 Fix flaky test attempt 2 2018-12-12 15:33:29 +03:00
Andrey Paramonov 316cca204f Switch to ini config parameter 2018-12-12 13:19:39 +03:00
Andrey Paramonov 0bccfc44a7 Fix flaky test 2018-12-12 12:14:14 +03:00