Bruno Oliveira
ce0a9aadec
Merge pull request #3127 from feuillemorte/1642-add-rootdir-option
...
#1642 add rootdir option
2018-02-07 18:18:59 -02:00
Bruno Oliveira
ed12cf3fb3
Merge pull request #3189 from s0undt3ch/feature/logstart-logfinish
...
Additionally handle logstart and logfinish hooks
2018-02-07 18:09:45 -02:00
Pedro Algarvio
67558e0e22
Additionally handle logstart and logfinish hooks
2018-02-06 15:45:36 +00:00
Bruno Oliveira
2d0c1e941e
Fix versionadded tag in caplog function
2018-02-05 20:22:21 -02:00
Thomas Hisch
c0ef4a4d35
Add captured log msgs to junit xml file
...
For each test this adds the captured log msgs to a system-* tag in the junit
xml output file. The destination of the system-* tag is specified by
junit_logging ini option.
2018-02-03 09:39:29 +01:00
feuillemorte
3eb6cad222
#1642 Fix comments
2018-02-01 11:20:37 +03:00
feuillemorte
9f1772e679
#1642 Resolve conflicts
2018-02-01 00:18:28 +03:00
feuillemorte
741b571f3b
#1642 fix tests and config.py
2018-02-01 00:03:24 +03:00
Thomas Hisch
ebab1b6c69
live-logging: Colorize levelname
2018-01-30 18:21:12 +01:00
Bruno Oliveira
49773b573f
Merge pull request #3132 from raphaelcastaneda/feature/add-record-xml-attribute
...
implement #3130 - add record_xml_attribute fixture
2018-01-29 15:42:55 -02:00
Bruno Oliveira
269eeec702
Replace deprecated option.getvalue by option.getoption in cacheprovider
2018-01-29 08:40:29 -02:00
Bruno Oliveira
0e1be01b7a
Merge pull request #3108 from cheezman34/features
...
Optimize reorder_items in fixtures.py
2018-01-27 23:21:09 -02:00
Bruno Oliveira
aff463a3c4
Merge remote-tracking branch 'upstream/master' into features
2018-01-27 12:28:43 -02:00
Bruno Oliveira
b3247c1d03
Merge pull request #3044 from RonnyPfannschmidt/parameterset-empty-enable-xfail
...
empty parameterset - enable opt to xfail
2018-01-27 12:23:49 -02:00
Bruno Oliveira
cd0b2ace67
Merge pull request #3150 from alanbato/pytest_cache
...
Change cache directory structure to include `pytest`
2018-01-27 10:08:56 -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
d550c33cd0
s/empty_parameterset/empty_parameter_set_mark
2018-01-26 11:56:24 +01:00
Bruno Oliveira
a58099022a
Merge pull request #3124 from nicoddemus/logging-3013
...
Changes in the logging plugin for 3.4
2018-01-26 08:52:43 -02: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
Alan Velasco
a24ca9872f
Change cache directory name to include `pytest`
2018-01-25 07:50:08 -06:00
feuillemorte
503e00f7ff
#1642 Remove adding rootdir to sys path
2018-01-25 15:57:29 +03: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
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
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
Andrew Toolan
2c7f94fdb9
Added basic fix and test
2018-01-23 21:18:10 -02:00
Bruno Oliveira
b4e8861aa5
Fix typos
2018-01-23 19:02:32 -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
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
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
196dcc37a8
Clarify a possible confusion when using pytest_fixture_setup with fixture functions that return None
2018-01-21 21:50:26 +02:00
feuillemorte
83034bbd48
#1642 Fix rootdir option
2018-01-20 22:30:01 +03: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
9dbcac9af3
Suspend stdout/stderr capturing when emitting live logging messages
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
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
Bruno Oliveira
3b3d237f07
Merge pull request #3117 from boxed/access_logs_in_teardown
...
Access captures logs in teardown
2018-01-20 11:21:17 -02:00
Anders Hovmöller
7ea5a22657
Access captures logs in teardown
2018-01-19 12:42:35 +01:00
feuillemorte
d784155fd2
#1642 Add rootdir option
2018-01-17 23:02:31 +03:00
Bruno Oliveira
e3406e0818
Show usage errors in red
2018-01-16 19:35:32 -02:00