Commit Graph

1406 Commits

Author SHA1 Message Date
Anthony Sottile 4e0f99260d Add regression tests for __init__.py breakage 2019-11-15 13:19:31 -08:00
Bruno Oliveira 5e8c47faad Preparing release version 5.2.3 2019-11-14 11:12:06 -03:00
Bruno Oliveira 6f2c0fd2e8 Show a better message when 'request' is used in parametrize
Fix #6183
2019-11-13 19:57:10 -03:00
Bruno Oliveira 85288b5321
fix bug with nonskipped first test in package (#5831)
fix bug with nonskipped first test in package
2019-11-06 16:06:46 -03:00
David Szotten 285524c6cd Fix --trace for parametrized tests
Without this, the second time it tries to stop in a parametrized
function it raises instead:

`ValueError: --trace can't be used with a fixture named func!`

Implementation idea, test (and changelog tweaks) thanks to blueyed

Co-Authored-By: Ronny Pfannschmidt <opensource@ronnypfannschmidt.de>
Co-Authored-By: Daniel Hahler <git@thequod.de>
2019-10-31 21:41:33 +00:00
Bruno Oliveira b27ba97721 Preparing release version 5.2.2 2019-10-24 19:24:04 -04:00
Bruno Oliveira ba4b8c869c Review rm_rf handling of FileNotFoundErrors 2019-10-23 08:30:52 -03:00
Daniel Hahler 82e9013e73
Merge pull request #6004 from blueyed/fix-nf
cache: NFPlugin: keep known nodeids
2019-10-23 01:04:48 +02:00
Daniil Galiev 9275012ef7 fix bug with nonskipped first test in package 2019-10-21 00:11:24 +02:00
Yoav Caspi e05b33ed16 setuponly: remove printing out/err from capman 2019-10-19 22:33:19 +03:00
Daniel Hahler 3173a26388 cache: NFPlugin: keep known nodeids
Caveat: does not forget about old nodeids

Fixes https://github.com/pytest-dev/pytest/issues/5206
2019-10-19 04:53:01 +02:00
Victor Maryama 63e3d89647 Fixed linting. 2019-10-12 15:08:47 +02:00
Victor Maryama 122748a6cf Added changelog file. 2019-10-12 14:38:58 +02:00
Bruno Oliveira 068ef90b92 Preparing release version 5.2.0 2019-09-28 21:18:37 -04:00
Bruno Oliveira 7bdfba3578 Fix --setup-only and --setup-show for custom pytest items
Fix #5884
2019-09-28 11:52:09 -03:00
Daniel Hahler 409cc2946a Merge master into features 2019-09-21 16:22:48 +02:00
Bruno Oliveira 1a9f4a51cb Preparing release version 5.1.3 2019-09-18 10:11:59 -03:00
Bruno Oliveira 6918d07560 Merge remote-tracking branch 'upstream/features' into aklajnert/1682-dynamic-scope 2019-09-18 07:44:18 -03:00
Daniel Hahler 450409d123 Merge master into features
Conflicts:
	src/_pytest/reports.py
        (via 7259c453d, moved the type annotation; setting it to `None`
        was removed in 3c82b1cb9 already)
2019-09-17 12:46:36 +02:00
Daniel Hahler 702acdba46
Merge pull request #5811 from blueyed/fulltrace-pytest-raises
Handle --fulltrace with pytest.raises
2019-09-14 02:09:36 +02:00
Daniel Hahler f832ac3316 Handle --fulltrace with pytest.raises
This changes `_repr_failure_py` to use `tbfilter=False` always.
2019-09-14 01:41:43 +02:00
Bruno Oliveira 5c3b4a6f52 Add CHANGELOG entry for #5792 2019-09-12 08:05:50 -03:00
Anthony Sottile 9d7b919c7d Fix pypy3.6 on windows 2019-09-07 16:49:05 -07:00
aklajnert 10bf6aac76 Implemented the dynamic scope feature. 2019-08-31 18:12:24 +02:00
Michael Goerz f8dd6349c1 Fix "lexer" being used when uploading to bpaste.net
Closes #5806.
2019-08-30 15:34:03 -04:00
Bruno Oliveira e56544cb58 Preparing release version 5.1.2 2019-08-30 12:43:47 -03:00
Bruno Oliveira bd57307a39
Merge pull request #5768 from robholt/fixture-class-instance
Fix self reference in function scoped fixtures
2019-08-30 12:31:16 -03:00
Bruno Oliveira 4e594552eb
Merge pull request #5798 from aklajnert/570-indirect-fixtures
Fix the scope behavior with indirect fixtures
2019-08-30 12:29:03 -03:00
Bruno Oliveira 955dc6d18a Merge remote-tracking branch 'upstream/master' into robholt/fixture-class-instance 2019-08-30 11:21:33 -03:00
Bruno Oliveira 3ddbc7fb2a Improve CHANGELOG and add some comments
Ref: #5768
2019-08-30 11:20:19 -03:00
Bruno Oliveira 35b3b1097f Improve CHANGELOG and make test easier to understand for #570 2019-08-30 10:54:58 -03:00
Bruno Oliveira 01082fea12
Serialize/deserialize chained exceptions (#5787)
Serialize/deserialize chained exceptions
2019-08-30 07:29:48 -03:00
Bruno Oliveira a511b98da9 Serialize/deserialize chained exceptions
Fix #5786
2019-08-29 20:23:44 -03:00
Andrzej Klajnert 487659d8b1 Fix the scope behavior with indirect fixtures. 2019-08-29 07:23:08 +02:00
Christian Neumüller a98270eac0 Document the bugfix. 2019-08-27 16:36:40 +02:00
Michael Goerz d47b9d04d4 Gracefully handle HTTP errors from pastebin
We find that the --pastebin option to pytest sometimes fails with "HTTP
Error 400: Bad Request". We're still investigating the exact cause of
these errors, but in the meantime, a failure to upload to the pastebin
service should probably not crash pytest and cause a test failure in the
continuous-integration.

This patch catches exceptions like HTTPError that may be thrown while
trying to communicate with the pastebin service, and reports them as a
"bad response", without crashing with a backtrace or failing the entire
test suite.
2019-08-26 23:50:46 -04:00
Bruno Oliveira c28e428249 Merge remote-tracking branch 'upstream/master' into mm 2019-08-26 20:00:30 -03:00
Bruno Oliveira 1c7aeb670a Fix linting 2019-08-24 15:01:48 -03:00
linchiwei123 a4adf511fc Fix TypeError
can only concatenate str (not "bytes") to str
2019-08-24 23:10:17 +08:00
Anthony Sottile b135f5af8d Preparing release version 5.1.1 2019-08-20 11:30:36 -07:00
Robert Holt 62381125e7
Fix self reference in function scoped fixtures 2019-08-19 15:57:39 -04:00
Daniel Hahler 2a6a1ca07d Inject width via pylib to argparse formatter
`argparse.HelpFormatter` looks at `$COLUMNS` only, falling back to a
default of 80.

`py.io.get_terminal_width()` is smarter there, and could even work
better with https://github.com/pytest-dev/py/pull/219.

This ensures to use a consistent value for formatting the ini values etc.
2019-08-17 16:51:02 +02:00
Ran Benita 9f3bfe82cf Fix TypeError when importing pytest on Python 3.5.0 and 3.5.1
The typing module on these versions have these issues:

- `typing.Pattern` cannot appear in a Union since it is not considered a
  class.

- `@overload` is not supported in runtime. (On the other hand, mypy
  doesn't support putting it under `if False`, so we need some runtime
  hack).

Refs #5751.
2019-08-17 15:41:59 +03:00
Bruno Oliveira eaf7ce9a99 Preparing release version 5.1.0 2019-08-15 20:00:09 -04:00
Bruno Oliveira d7f082519a Merge remote-tracking branch 'upstream/master' into mm
Conflicts:
	src/_pytest/outcomes.py
2019-08-15 10:03:52 -03:00
Bruno Oliveira 28c6c5bb71
check that tests that are partial staticmethods are supported (#5701)
check that tests that are partial staticmethods are supported
2019-08-15 09:12:01 -03:00
Bruno Oliveira 0ba774a7c3
warn for async generator functions (#5734)
warn for async generator functions
2019-08-15 08:17:12 -03:00
Thomas Grainger 137255816e Fix collection of staticmethods defined with functools.partial
Related to #5701
2019-08-15 08:04:05 -03:00
Thomas Grainger 2f1b192fe6 Issue a warning for async gen functions
Co-Authored-By: Bruno Oliveira <nicoddemus@gmail.com>
2019-08-15 07:54:10 -03:00
dmitry.dygalo 7183335e62 Capture warnings during ``pytest_configure``
Fix #5115
2019-08-15 07:50:27 -03:00