Commit Graph

118 Commits

Author SHA1 Message Date
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
Bruno Oliveira 33b877cc01 Merge remote-tracking branch 'upstream/master' into merge-master-into-features 2018-11-23 23:27:41 -02:00
Anthony Sottile b3700f61ba Fix formatting of print() calls 2018-11-22 00:15:14 -08:00
Anthony Sottile 8395b9e25d Require id=... to be a string
This was documented before, but never enforced.  Passing non-strings could
have strange side-effects and enforcing a string simplifies other
implementation.
2018-11-19 11:03:52 -08:00
Bruno Oliveira dc20dedbc7 Change RemovedInPytest4Warnings to errors by default
To keep existing tests which emit RemovedInPytest4Warnings running, decided
to go with a command line option because:

* Is harder to integrate an ini option with tests which already use an ini file
* It also marks tests which need to be removed/updated in 4.1, when
  RemovedInPytest4Warning and related functionality are removed.

Fix #3737
2018-11-12 16:10:57 -02:00
Anthony Sottile 2368fbb63c Apply reorder-python-imports to all files 2018-10-25 00:01:29 -07:00
Bruno Oliveira 5436e42990 Use pytest.fail(..., pytrace=False) when treating user errors
This prevents an enormous and often useless stack trace from showing
to end users.

Fix #3867
Fix #2293
2018-10-10 19:16:53 -03:00
Bruno Oliveira 1101a20408 Merge remote-tracking branch 'upstream/master' into merge-master-into-features 2018-10-02 18:13:54 -03:00
Ronny Pfannschmidt 5d2d64c190
Merge pull request #4057 from jeffreyrack/4051-improve-error-messaging
Improve error messaging when invalid syntax is passed to the -m option
2018-10-01 07:16:59 +02:00
Jeffrey Rackauckas c2179c3127 Improve error messaging when invalid syntax is passed to the -m option 2018-09-30 18:34:56 -07:00
Andrea Cimatoribus 05155e4db0 Fail at parametrize option for empty parameter set
Optionally raise an exception when parametrize collects no arguments.
Provide the name of the test causing the failure in the exception
message.

See: #3849
2018-09-15 09:18:03 +02:00
Bruno Oliveira ddb308455a Make sure warn is called in test_parameterset_extractfrom 2018-09-05 09:01:29 -03:00
Bruno Oliveira 47bf58d69e Make Node.warn support two forms, new and deprecated
As suggested during review, it now accepts two forms:

Node.warn(warning_instance)  (recommended)

Node.warn(code, message)  (deprecated)
2018-09-04 15:53:17 -03:00
Bruno Oliveira b42518acd5 Change std_warn to receive a single warning instance, addressed review suggestions 2018-09-04 14:20:42 -03:00
Bruno Oliveira 19a01c9849 Make PytestWarning and RemovedInPytest4Warning part of the public API 2018-09-04 11:35:34 -03:00
Bruno Oliveira 0100f61b62 Start the laywork to capture standard warnings 2018-09-04 11:35:15 -03:00
Bruno Oliveira 7696d5371a Merge remote-tracking branch 'upstream/master' into features 2018-07-04 18:49:35 -03:00
Ronny Pfannschmidt 5bd5b8c68a fix #3631 - don't store legacy markinfo when its impossible 2018-06-29 14:01:20 +02:00
Ronny Pfannschmidt 3c73d6298a merge from master to features 2018-06-28 17:32:41 +02:00
Ronny Pfannschmidt b8486037d3 fix #3605 - unpack markdecorators from parameterization 2018-06-26 21:57:31 +02:00
Ronny Pfannschmidt 78a82c05ef consistent failure on all python versions for test_markers_from_parametrize 2018-06-26 21:57:31 +02:00
Ronny Pfannschmidt 853975d93b add failing test for #3605 2018-06-26 21:57:31 +02:00
Ronny Pfannschmidt 89e0a3ec27 merge from master to features 2018-06-26 17:01:05 +02:00
Anthony Sottile cbaa7dd56a Upgrade pre-commit hooks except pyupgrade 2018-06-26 06:35:27 -07:00
Ondřej Súkup deff54aae0
Try import mock, but on python 3.3+ can use also stdlib unittest.mock
From Python 3.3 is mock part of python standard library in unittest namespace
2018-06-23 23:27:07 +02:00
Ronny Pfannschmidt eb0c6a8287 fix addmarker - extract mark from markdecorator 2018-06-13 17:27:00 +02:00
Ronny Pfannschmidt 37793d4cdb fix addmarker - extract mark from markdecorator 2018-06-12 15:50:58 +02:00
Ronny Pfannschmidt 703e4b11ba run black 2018-05-23 16:48:46 +02:00
Ronny Pfannschmidt 3e1590bcfc sort out pyupgrade fallout 2018-05-23 16:45:58 +02:00
Ronny Pfannschmidt 9aacb4635e run pyupgrade 2018-05-23 16:45:09 +02:00
Ronny Pfannschmidt 4914135fdf introduce name filtering for marker iteration again 2018-05-11 21:48:15 +02:00
Ronny Pfannschmidt e6a86e0f4c add tests for #3441 2018-05-03 17:33:59 +02:00
Ronny Pfannschmidt a5cf55dd4a fix test_mark_option_custom - it used the legacy keyword storage for addign markers 2018-05-03 16:33:16 +02:00
Ronny Pfannschmidt dbb1b5a227 remove NodeMarkers, turn own_markers into a list and use iter_markers api exclusively 2018-03-29 18:24:10 +02:00
Ronny Pfannschmidt 159ea9b7c0 turn Markinfo into atts clsas, and return correct instances of it from node.get_marker 2018-03-29 17:52:01 +02:00
Ronny Pfannschmidt 180ae09202 deprecate markinfo and fix up most marker scoping access while completely breaking metafunc testing 2018-03-29 17:52:01 +02:00
Ronny Pfannschmidt f1a1695aaa enable deep merging test - new structure fixed it 2018-03-29 17:52:01 +02:00
Ronny Pfannschmidt 2707221559 port mark evaluation to the new storage and fix a bug in evaluation 2018-03-29 17:52:01 +02:00
Ronny Pfannschmidt 17a1ed5edf use a constant to sort out repeated use of the EMPTY_PARAMETERSET_OPTION 2018-01-26 12:12:26 +01:00
Ronny Pfannschmidt a54cd4c2fd correct testing and usage of the empty_parameter_set_mark config option 2018-01-26 12:05:52 +01:00
Ronny Pfannschmidt d4c11e58aa exted empty parameterset check with reason test 2018-01-26 11:18:50 +01:00
Ronny Pfannschmidt 37b41de779 fix #2527 - introduce a option to pic the empty parameterset action 2018-01-26 11:10:00 +01:00
feuillemorte 8433e2ba04 #2953 fix comments: fix exception type 2018-01-16 23:35:57 +03:00
feuillemorte 076fb56f85 show a simple and easy error when keyword expressions trigger a syntax error 2018-01-16 21:30:44 +03:00
Bruno Oliveira 05cfdcc8cb Revert making TerminalWriter public in TerminalReporter plugin
We eventually want to replace py.io.TerminalWriter (exposed as
"_tw" in TerminalReporter) by something else, so deprecating access
to "_tw" and making it public as "writer" is contrary to that.
2017-11-23 19:53:12 -02:00
Sviatoslav Abakumov 5e71ffab87 Handle marks without description 2017-11-22 15:47:15 +03:00
Bruno Oliveira 03829fde8a Fix linting E741: ambiguous variable name 2017-11-04 13:59:10 -02:00
Sviatoslav Abakumov 52aadcd7c1 Strip whitespace from markers in INI config
Resolves #2856.
2017-10-24 14:18:39 +03:00
Leonard Lausen e86ba41a32 Add testcase for #2819 2017-10-09 01:06:25 +09:00