Commit Graph

10320 Commits

Author SHA1 Message Date
Thomas Hisch 84569ca4da
Merge pull request #5311 from thisch/coloredcaplog
Use same code for setting up cli/non-cli formatter
2019-05-29 22:18:43 +02:00
Thomas Hisch 31b1c4ca0c
Update changelog/5311.feature.rst
Co-Authored-By: Daniel Hahler <github@thequod.de>
2019-05-29 22:00:34 +02:00
Bruno Oliveira 5bc3ad8e27
minor: getbasetemp: dedent, improve assert (#5327)
minor: getbasetemp: dedent, improve assert
2019-05-28 19:59:43 -03:00
Bruno Oliveira a930ca0b45
Remove _pytest.compat.NoneType (#5326)
Remove _pytest.compat.NoneType
2019-05-28 19:58:17 -03:00
Thomas Hisch d4b85da8c7 Use same code for setting up cli/non-cli formatter
A method _create_formatter was introduced that is used for both the
log_cli_formatter and the log_formatter.

Consequences of this commit are:
* Captured logs that are output for each failing test are formatted
  using the ColoredLevelFromatter.
* The formatter used for writing to a file still uses the non-colored
  logging.Formatter class.
2019-05-28 21:30:34 +02:00
Daniel Hahler 97d8e9fbec minor: getbasetemp: dedent, improve assert 2019-05-28 18:26:10 +02:00
Daniel Hahler 220a2a1bc9 Remove _pytest.compat.NoneType 2019-05-28 18:16:18 +02:00
Daniel Hahler 6061ecf95a
Merge master into features (#5319) 2019-05-28 02:15:15 +02:00
Daniel Hahler e032904413 Merge master into features 2019-05-28 01:46:16 +02:00
Bruno Oliveira ece774f0eb
pdb: import pdbcls lazily (#5307)
pdb: import pdbcls lazily
2019-05-27 20:23:39 -03:00
Bruno Oliveira bc49d6ff99
Update docs about py27 and py34 support plans (#5316)
Update docs about py27 and py34 support plans
2019-05-27 20:22:31 -03:00
Bruno Oliveira 2b9ca34280
Unroll calls to any #5062 (#5103)
Unroll calls to any #5062
2019-05-27 20:17:44 -03:00
Bruno Oliveira e38561037d Update docs about py27 and py34 support plans
As discussed in #5275
2019-05-27 19:28:27 -03:00
Anthony Sottile 0a57124063
Merge pull request #5063 from asottile/importlib_metadata_v2
Switch to importlib-metadata
2019-05-27 15:00:12 -07:00
Anthony Sottile 13f02af97d Switch to importlib-metadata 2019-05-27 13:24:08 -07:00
Daniel Hahler f2ed796c41 pdb: import pdbcls lazily
Fixes https://github.com/pytest-dev/pytest/issues/2064.
2019-05-26 15:56:38 +02:00
Anthony Sottile b3f8fabac8
Merge pull request #5308 from blueyed/minor
Minor fixes
2019-05-25 21:58:39 -07:00
Tomer Keren 22d91a3c3a Unroll calls to all on python 2 2019-05-25 19:34:08 +03:00
Tomer Keren 322a0f0a33 Fix mention of issue #5062 in docstrings 2019-05-25 19:34:08 +03:00
Tomer Keren 58149459a5 Mark visit_all as a private method 2019-05-25 19:34:08 +03: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 e37ff3042e Check calls to all only if it's a name and not an attribute 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 ddbe733666 Add changelog entry for 5062 2019-05-25 19:34:08 +03:00
Tomer Keren 470e686a70 Rewrite unrolled assertion with a new rewriter,correctly append the unrolled for loop 2019-05-25 19:34:08 +03:00
Tomer Keren 765f75a8f1 Replace asserts of `any` with an assert in a for 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
Bruno Oliveira e393a73890 Small change to test if pushing directly to master is disabled 2019-05-24 12:11:15 -03:00
Thomas Hisch bed3918cbc Revert "logging: Simple impl of multline pretty printing"
This reverts commit 31dfbb4668.
2019-05-24 09:11:03 +02:00
Thomas Hisch 31dfbb4668 logging: Simple impl of multline pretty printing 2019-05-24 09:09:09 +02:00
Bruno Oliveira b4d75ad31d
Merge pull request #5091 from blueyed/showhelp-ini-options
Improve output of ini options in --help
2019-05-23 21:10:43 -03: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
Daniel Hahler fa8a658458
Merge pull request #4908 from blueyed/pdb-pm-enter-hook
pdb: trigger pytest_enter_pdb hook with post-mortem
2019-05-24 01:50:24 +02:00
Bruno Oliveira 66f20b6f5e
Fix invalid Python file encoding "utf8" (#5252)
Fix invalid Python file encoding "utf8"
2019-05-23 20:24:23 -03: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
Bruno Oliveira b900b4155f
importorskip: display/include ImportError (#5269)
importorskip: display/include ImportError
2019-05-23 19:25:34 -03:00
Bruno Oliveira 364ae5d723
changelog: Fix typo (#5304)
changelog: Fix typo
2019-05-23 14:16:49 -03:00
David Röthlisberger 84c7fef836
changelog: Fix typo 2019-05-23 16:48:39 +01:00
Bruno Oliveira aaea4e52ef
Fix whitespace in FUNDING.yml 2019-05-23 12:44:55 -03:00
Bruno Oliveira 0cacdadc97
Create FUNDING.yml
Following instructions from:

* https://tidelift.com/subscription/how-to-connect-tidelift-with-github
* https://help.github.com/en/articles/displaying-a-sponsor-button-in-your-repository#displaying-a-sponsor-button-in-your-repository
2019-05-23 12:36:46 -03:00
Daniel Hahler 6c56070df1
Merge pull request #5278 from blueyed/disable-python-plugin
Allow disabling of python plugin
2019-05-23 15:52:19 +02:00
Daniel Hahler f9f41e69a8 reportopts: A: put "Pp" in front 2019-05-23 09:40:16 +02:00
Daniel Hahler b2ce6f3200 Improve output of ini options in --help
Do not cut long help texts, but wrap them the same way as argparse wraps
the other help items.
2019-05-23 09:33:07 +02:00
Daniel Hahler e0b584d048 CaptureFixture: do not crash in _suspend when not started
This happened in test_pdb_with_caplog_on_pdb_invocation.
2019-05-23 09:09:53 +02:00
Daniel Hahler a0ff5deabf pdb: trigger pytest_enter_pdb hook with post-mortem
This is required for pytest-pdb to be called with `--pdb`.

TODO:

- [ ] test
- [ ] pass mode to hook, e.g. "post_mortem" in this case?
2019-05-23 09:09:53 +02:00