Bruno Oliveira
2b9ca34280
Unroll calls to any #5062 ( #5103 )
...
Unroll calls to any #5062
2019-05-27 20:17:44 -03:00
Anthony Sottile
13f02af97d
Switch to importlib-metadata
2019-05-27 13:24:08 -07:00
Anthony Sottile
b3f8fabac8
Merge pull request #5308 from blueyed/minor
...
Minor fixes
2019-05-25 21:58:39 -07:00
Tomer Keren
852fb6a4ae
Change basic test case to be consistent with existing assertion rewriting
...
The code
```
x = 0
assert x == 1
```
will give the failure message 0 == 1, so it shouldn't be different as
part of an unroll
2019-05-25 19:34:08 +03:00
Tomer Keren
437d6452c1
Expand list comprehensions as well
2019-05-25 19:34:08 +03:00
Tomer Keren
ecd2de25a1
Revert "Displaying pip list command's packages and versions #5062"
...
This reverts commit 043fdb7c4065e5eb54f3fb5776077bb8fd651ce6.
These tests were part of the PR #5155 but weren't relevant to #5602
2019-05-25 19:34:08 +03:00
danielx123
c607697400
Fixed test case
2019-05-25 19:34:08 +03:00
danielx123
0996f3dbc5
Displaying pip list command's packages and versions #5062
2019-05-25 19:34:08 +03:00
danielx123
a0dbf2ab99
Adding test cases for unrolling an iterable #5062
2019-05-25 19:34:08 +03:00
Tomer Keren
6b5152ae13
Sanity tests for loop unrolling
2019-05-25 19:34:08 +03:00
Daniel Hahler
10ca84ffc5
Merge pull request #5119 from blueyed/reportopts-A-order
...
reportopts: A: put "Pp" in front
2019-05-24 18:28:43 +02:00
Daniel Hahler
ec6d0fa4d7
Merge pull request #5268 from blueyed/harden-test
...
tests: harden test_nonascii_text
2019-05-24 01:51:35 +02:00
Bruno Oliveira
6ba5e3c071
tests: fix test_trace_after_runpytest ( #5245 )
...
tests: fix test_trace_after_runpytest
2019-05-23 19:58:33 -03:00
Daniel Hahler
f9f41e69a8
reportopts: A: put "Pp" in front
2019-05-23 09:40:16 +02:00
Daniel Hahler
d19df5efa2
importorskip: display/include ImportError
...
This can provide useful information, e.g.
> could not import 'pyrepl.readline': curses library not found
2019-05-20 14:13:33 +02:00
Daniel Hahler
ff428bfee1
tests: harden test_nonascii_text
2019-05-17 18:06:32 +02:00
Anthony Sottile
4318698bae
Remove 'b' from sys.stdout.mode
2019-05-14 15:00:59 -07:00
Daniel Hahler
c081c01eb1
minor: s/no covers/no cover/
2019-05-14 06:51:49 +02:00
Daniel Hahler
f8e1d58e8f
minor: settrace != set_trace
2019-05-14 06:51:30 +02:00
Daniel Hahler
dda21935a7
tests: fix test_trace_after_runpytest
...
It was not really testing what it was supposed to test (e.g. the inner
test was not run in the first place).
2019-05-12 09:33:34 +02:00
Bruno Oliveira
465b2d998a
Further "unknown marks warning" improvements ( #5178 )
...
Further "unknown marks warning" improvements
2019-05-11 13:28:10 -03:00
Bruno Oliveira
73bbff2b74
Introduce record_testsuite_property fixture
...
This exposes the functionality introduced in fa6acdc
as a session-scoped fixture.
Plugins that want to remain compatible with the `xunit2`
standard should use this fixture instead of `record_property`.
Fix #5202
2019-05-10 19:44:27 -03:00
Bruno Oliveira
0594dba5ce
Remove unused markers and enable --strict-markers
2019-05-09 19:36:39 -03:00
Bruno Oliveira
f1183c2422
Remove the 'issue' marker from test suite
...
It doesn't seem to add much value (why would one execute tests
based on that marker?), plus using the docstring for that
encourages one to write a more descriptive message about the test
2019-05-09 19:36:38 -03:00
Bruno Oliveira
685ca96c71
Change ``--strict`` to ``--strict-markers``, preserving the old one
...
Fix #5023
2019-05-09 19:36:38 -03:00
Bruno Oliveira
ccf6c3cb46
Merge remote-tracking branch 'upstream/master' into merge-master-into-features
2019-05-09 19:22:40 -03:00
Daniel Hahler
73b74c74c9
pdb: only use outcomes.exit via do_quit
...
Fixes https://github.com/pytest-dev/pytest/issues/5235 .
2019-05-09 14:55:55 +02:00
Daniel Hahler
5eeb5ee960
Merge pull request #5013 from blueyed/short-summary-message
...
Display message from reprcrash in short test summary
2019-05-08 22:01:04 +02:00
Pulkit Goyal
7e08e09473
logging: improve default logging format (issue5214)
...
We improve the following things in the logging format:
* Show module name instead of just the filename
* show level of logging as the first thing
* show lineno attached to module:file details
Thanks to @blueyed who suggested this on the github issue.
It's my first contribution and I have added myself to AUTHORS.
I also added to a changelog file.
2019-05-08 21:37:59 +03:00
Bruno Oliveira
6d040370ed
Show fixture scopes with ``--fixtures``, except for "function" scope
...
Fix #5220
2019-05-07 14:32:20 -03:00
Bruno Oliveira
1d466d0aa7
Use exec directly ( #5224 )
...
Use exec directly
2019-05-07 10:02:12 -03:00
Bruno Oliveira
ef4dec0bcf
Skip test_source_mtime_long_long on 32bit and lower platforms ( #5045 )
...
Skip test_source_mtime_long_long on 32bit and lower platforms
2019-05-07 09:42:18 -03:00
Anthony Sottile
d1a48ad68f
Use exec directly
2019-05-06 23:07:39 -07:00
Bruno Oliveira
32a5e80a6d
Add encoding: header and fix rep mock in test_line_with_reprcrash on py27
2019-05-05 09:33:37 -03:00
Bruno Oliveira
0e8a8f94f6
Add encoding header to test_terminal.py
2019-05-05 09:14:07 -03:00
Bruno Oliveira
8f23e19bcb
Emit a warning for record_property when used with xunit2
...
"property" elements cannot be children of "testsuite" according to the schema, so it is incompatible with xunit2
Related to #5202
2019-05-05 09:01:13 -03:00
Bruno Oliveira
fc2ad1dbed
Warning subclasses ( #5179 )
...
Warning subclasses
2019-04-29 17:57:49 -03:00
Bruno Oliveira
fb6dad60a0
terminal: use pytest_collection_finish for reporting ( #5113 )
...
terminal: use pytest_collection_finish for reporting
2019-04-29 08:00:48 -03:00
Daniel Hahler
ff5317a7f3
terminal: use pytest_collection_finish for reporting
2019-04-29 05:20:04 +02:00
Bruno Oliveira
08734bdd18
--lf now skips colletion of files without failed tests
...
Fix #5172
2019-04-28 20:23:46 -03:00
Bruno Oliveira
53cd7fd2ea
Introduce new warning subclasses
...
Fix #5177
2019-04-28 10:38:25 -03:00
Daniel Hahler
65133018f3
Terminal plugin is not semi-essential anymore
...
Thanks to https://github.com/pytest-dev/pytest/pull/5138 .
2019-04-27 03:39:00 +02:00
Daniel Hahler
308b733b9d
Revert "Merge pull request #4854 from blueyed/pdb-skip"
...
This reverts commit e88aa957ae
, reversing
changes made to 1410d3dc9a
.
I do not think it warrants an option anymore, and there is a way to
achieve this via `--pdbcls` if needed.
2019-04-27 02:25:38 +02:00
Daniel Hahler
7f519f8ab7
Merge master into features
2019-04-27 00:43:00 +02:00
Nikolay Kondratyev
bc00d0f7db
Fix handle repr error with showlocals and verbose output
2019-04-19 18:54:21 +03:00
Daniel Hahler
e3e57a755b
Merge pull request #5083 from blueyed/capture-_suspended
...
capture: store _state
2019-04-19 17:32:54 +02:00
Daniel Hahler
79d5fc3a0b
Merge pull request #5144 from blueyed/sessionfinish-exitstatus
...
pytest_sessionfinish: preset exitstatus with UsageErrors
2019-04-19 17:30:01 +02:00
Daniel Hahler
f75f7c1925
conftest: use a hookwrapper with sorting faster tests first
2019-04-19 01:23:34 +02:00
Daniel Hahler
698c4e75fd
capture: track current state in _state attributes
...
This is meant for debugging, and making assertions later.
2019-04-19 00:35:15 +02:00
Daniel Hahler
649d23c8a8
pytest_sessionfinish: preset exitstatus with UsageErrors
...
Previously it would be 0. Setting it to the expected outcome
(EXIT_USAGEERROR) here already helps `pytest_sessionfinish` hooks.
2019-04-18 23:18:59 +02:00