Ronny Pfannschmidt
7f83605c81
fix empty parameterset tests by mocking a config object
2018-01-26 11:10:00 +01:00
Ronny Pfannschmidt
37b41de779
fix #2527 - introduce a option to pic the empty parameterset action
2018-01-26 11:10:00 +01:00
Ronny Pfannschmidt
bf2c10c810
parameterset: refactor marking empty parametersets
2018-01-26 11:10:00 +01:00
Brian Maissy
4285325cb8
Added note that calling pytest.main multiple times from the same process is not recommended because of import caching
2018-01-25 23:07:34 +02:00
Brian Maissy
2a1b1107c5
If we fail to import doctest.UnexpectedException during postmortem, fail quietly and continue
2018-01-25 22:28:27 +02:00
Bruno Oliveira
cbbd606b6c
Reword changelog
2018-01-25 17:21:54 -02:00
Alan Velasco
a24ca9872f
Change cache directory name to include `pytest`
2018-01-25 07:50:08 -06:00
Bruno Oliveira
b8be339632
Merge pull request #3148 from nicoddemus/deprecate-old-style-classes-2147
...
All classes now subclass object for better py3 compatibility
2018-01-25 10:41:28 -02:00
Bruno Oliveira
2aad8c0fce
Merge pull request #3147 from nicoddemus/issue-3103
...
'-o' option no longer swallows all other non-options after it
2018-01-25 10:41:18 -02:00
Bruno Oliveira
15cbd61159
Change caplog.get_handler(when) to caplog.get_records(when)
...
While updating the docs I noticed that caplog.get_handler() exposes
the underlying Handler object, which I think it is a bit too much
detail at this stage. Update to return the records directly instead.
2018-01-24 19:08:49 -02:00
Bruno Oliveira
2f955e0c99
Update documentation: rewording and move things for better reading flow
2018-01-24 18:42:59 -02:00
Bruno Oliveira
af37778b0d
All classes now subclass object for better py3 compatibility
...
Fix #2147
2018-01-24 18:23:42 -02:00
Bruno Oliveira
3f5e9ea71e
Fix -o behavior to no longer swallow all remaining options
...
The current behavior was too error-prone because a "-o" option would
swallow all the following non-option parameters:
pytest -o foo=bar path/to/test.py
path/to/test.py would be captured by the -o option, and would fail
because "path/to/test.py" is not in the format "key=value".
2018-01-23 21:19:16 -02:00
Bruno Oliveira
443275f025
Reword changelog a bit
2018-01-23 21:19:04 -02:00
Bruno Oliveira
8426c57a9e
Ensure changes in the message in the future do not make the test pass by accident
2018-01-23 21:18:59 -02:00
Aron Coyle
30ca9f9d38
Add endline
2018-01-23 21:18:51 -02:00
Aron Coyle
46d87deb5d
Add changelog update authors
2018-01-23 21:18:45 -02:00
Aron Coyle
203508d9f3
cleanup test cases
2018-01-23 21:18:37 -02:00
Andrew Toolan
2c7f94fdb9
Added basic fix and test
2018-01-23 21:18:10 -02:00
Bruno Oliveira
ff90c9e237
Merge pull request #3116 from brianmaissy/pexpect_test_hangs_on_mac
...
use flush in order to avoid hanging on mac
2018-01-23 19:32:19 -02:00
Bruno Oliveira
b4e8861aa5
Fix typos
2018-01-23 19:02:32 -02:00
Bruno Oliveira
baa189f5a3
Merge pull request #3131 from soyrice/master
...
Improve readability of Getting Started guide
2018-01-23 17:48:11 -02:00
Bruno Oliveira
113bfb6be8
Report 'call' phase as 'live log call'
...
As commented in review, this makes it consistent with the headers shown
by stdout/stderr capturing ("Captured log call")
2018-01-22 21:43:35 -02:00
Bruno Oliveira
9f4688e549
Remove unnecessary -s from test_log_cli_enabled_disabled
2018-01-22 21:26:14 -02:00
Bruno Oliveira
3a9d0b26d5
Use pytest_runtest_logstart to signal the start of a new test
...
This also simplifies the code a bit because we don't need to keep
a set of ids anymore
2018-01-22 21:20:48 -02:00
Raphael Castaneda
a5e60b6a2d
implement #3130 - adding record_xml_attribute fixture
...
update incorrect expected attribute value in test_record_attribute
attr names must be strings
Update CHANGELOG formatting
update usage documentation
Fix versionadded for record_xml_attribute
Indent the xml schema properly inside the warning box in the docs
2018-01-22 15:14:53 -08:00
Bruno Oliveira
0df42b4426
Show a header for each testing phase during live logging
...
As suggested during review
2018-01-22 21:00:52 -02:00
Bruno Oliveira
0d96a5bf90
Merge pull request #3135 from brianmaissy/doc/clarify_pytest_fixture_setup_with_fixture_that_returns_None
...
Clarify a possible confusion when using pytest_fixture_setup with fixture functions that return None
2018-01-22 18:02:33 -02:00
Bruno Oliveira
060f68bd90
Merge pull request #3137 from brianmaissy/doc/note_that_certain_hooks_cant_be_used_with_hookwrapper
...
Document hooks (defined with historic=True) which cannot be used with hookwrapper=True
2018-01-22 18:00:35 -02:00
Bruno Oliveira
e5739a3115
Merge pull request #3136 from brianmaissy/doc/document_warning_filtering_behavior
...
Clarify that warning capturing doesn't change the warning filter by d…
2018-01-22 17:45:36 -02:00
Bruno Oliveira
8a8797df80
Small changelog formatting
2018-01-21 23:21:21 -02:00
Brian Maissy
8994603d46
Document hooks (defined with historic=True) which cannot be used with hookwrapper=True
2018-01-21 23:17:16 +02:00
Brian Maissy
5c0b340a4b
Clarify that warning capturing doesn't change the warning filter by default
2018-01-21 22:43:00 +02:00
Brian Maissy
196dcc37a8
Clarify a possible confusion when using pytest_fixture_setup with fixture functions that return None
2018-01-21 21:50:26 +02:00
Cyrus Maden
0ab57c4139
Typo fix: "handeling" --> "handling"
2018-01-20 11:12:59 -08:00
Bruno Oliveira
29a7b5e064
Initialize log_cli_handler to None during LoggingPlugin init
...
Some of testdir's functionality bypasses pytest_runtestloop so this
attribute needs to be set early
2018-01-20 14:19:45 -02:00
Bruno Oliveira
27ae270159
Mention in docs that log messages of level WARNING or above are captured
2018-01-20 12:08:51 -02:00
Bruno Oliveira
2e40a8b3ca
Fix test_caplog_captures_for_all_stages by setting log level
2018-01-20 12:04:28 -02:00
Bruno Oliveira
18e053546c
Use six.StringIO and __name__ in test_live_logging_suspends_capture
2018-01-20 12:02:55 -02:00
Bruno Oliveira
9dbcac9af3
Suspend stdout/stderr capturing when emitting live logging messages
2018-01-20 12:02:55 -02:00
Bruno Oliveira
4a436572a8
Simplify test assertions a bit
2018-01-20 12:02:55 -02:00
Bruno Oliveira
97a4967b03
Improve code formatting
2018-01-20 12:02:55 -02:00
Bruno Oliveira
8f6a5928f7
Add newline before log messages and enable -v output when log_cli is enabled
2018-01-20 12:02:55 -02:00
Bruno Oliveira
5d89a93977
Small improvements to tests suggested during review
2018-01-20 12:02:54 -02:00
Bruno Oliveira
c53b72fd7b
Add CHANGELOG for 3013
2018-01-20 12:02:54 -02:00
Bruno Oliveira
6bb739516f
Update logging docs with the new changes in 3.4
...
Ref: #3013
2018-01-20 12:02:54 -02:00
Bruno Oliveira
8d735f3e1d
Live log option now writes to the terminal reporter
...
Ref: #3013
2018-01-20 12:01:42 -02:00
Bruno Oliveira
aca1b06747
Undo log level set by caplog.set_level at the end of the test
...
Otherwise this leaks the log level information to other tests
Ref: #3013
2018-01-20 12:01:42 -02:00
Bruno Oliveira
8dcd2718aa
No longer change the level of any logger unless requested explicitly
...
Ref: #3013
2018-01-20 12:01:42 -02:00
Bruno Oliveira
5ad1313b8a
log_cli must now be enabled explicitly
...
Ref: #3013
2018-01-20 12:00:46 -02:00