Commit Graph

12368 Commits

Author SHA1 Message Date
Daniel Hahler 197b7c3bce
Add .gitblameignore (#6848) 2020-03-04 05:32:30 +01:00
Daniel Hahler 37d074efc8
Fix (internal) documentation for pytester's LineComp (#6850) 2020-03-04 05:25:32 +01:00
Ronny Pfannschmidt a5a8d53dfe
remove myself from the list of coc handlers (#6857) 2020-03-03 19:08:59 -03:00
Ronny Pfannschmidt 9fd71d6fe0
fix #571: deprecate pytest_collect_directory as ... (#6847)
Deprecate pytest_collect_directory

Fix #571

Co-authored-by: Daniel Hahler <github@thequod.de>
2020-03-03 18:58:14 -03:00
Daniel Hahler b11bfa106c
Use attrs with all Repr classes (#6739)
Co-authored-by: Ran Benita <ran234@gmail.com>
2020-03-03 21:53:28 +01:00
Daniel Hahler dc5219a9c0 Fix documentation for Config/InvocationParams 2020-03-03 21:15:06 +01:00
Daniel Hahler a42e85ed54 Fix documentation for _pytest.pytester.RunResult
When using `(i)var` in the class docstring it would link `duration` to
`_pytest.runner.TestReport.duration`.

This moves the docstrings to the attributes properly.
2020-03-03 18:12:12 +01:00
Bruno Oliveira aac11e5e75 Mention FixtureLookupError in getfixturevalue docs 2020-03-03 10:05:19 -03:00
Bruno Oliveira a03e076e89 Update changelog/6285.feature.rst
Co-Authored-By: Ran Benita <ran234@gmail.com>
2020-03-03 09:59:38 -03:00
earonesty b2d54fe6b1 Fix tox alpha order 2020-03-03 09:59:38 -03:00
earonesty 9b8ed8d9ad Update pytest.py 2020-03-03 09:59:38 -03:00
earonesty 615474329d Update AUTHORS 2020-03-03 09:59:38 -03:00
earonesty 7667ff51e7 Update fixtures.py 2020-03-03 09:59:38 -03:00
earonesty 74cdff86f8 Update conftest.py 2020-03-03 09:59:38 -03:00
earonesty 0f00495548 Create 6285.feature.rst 2020-03-03 09:59:38 -03:00
earonesty b40a9f9add Export FixtureLookupError to top level 2020-03-03 09:59:38 -03:00
Daniel Hahler bd7e33277b
docs: remove tracking through Google Analytics (#6843)
This might not even be monitored by anyone, but if it is useful in
general should probably get replaced with a less controversial provider.
2020-03-03 01:35:14 +01:00
Daniel Hahler 620d457756 doc: add __tracebackhide__ label 2020-03-02 17:08:37 +01:00
Daniel Hahler ddc8edffbc logging: minor typing, rename function
`get_log_level_for_setting` reflects better what the function does, and
it does not require a (trivial) docstring.
2020-03-01 22:02:46 +01:00
Daniel Hahler bdd22fdd52 logging: improve help for log_level 2020-03-01 22:02:46 +01:00
Ronny Pfannschmidt 3637d9eb3f followup: add note on from_parent kwargs 2020-03-01 20:34:38 +01:00
Ronny Pfannschmidt 5c1e56d350 docs: from_parent - add minimal before/after example
fixup: fix from_parent version
2020-03-01 20:34:38 +01:00
Ronny Pfannschmidt 3d390940d1 refer the node-from-parent deprecation documentation in the warning
fixup: fix test for warning
2020-03-01 20:33:46 +01:00
Ronny Pfannschmidt 194b52145b
Merge pull request #6834 from RonnyPfannschmidt/fix-6833-summarize-warning-item-locations
summarize warning summaries if the number of locations is high
2020-03-01 20:21:36 +01:00
Bruno Oliveira 15e1dd0f87
Automate release by comment notifications (#6823)
* Automate release by comment notifications

* Only run if @pytestbot is mentioned
2020-03-01 14:46:35 -03:00
Ronny Pfannschmidt 23c43a37e0 summarize warning summaries if the number of locations is high 2020-03-01 14:08:15 +01:00
Bruno Oliveira 92767fec51
Merge pull request #6836 from bluetech/store
Add a typing-compatible mechanism for ad-hoc attributes on various objects
2020-03-01 09:30:10 -03:00
Ran Benita 5fc80d8bc3
Merge pull request #6844 from bluetech/asserthook-abc-loader
Mark AssertionRewritingHook as implementing importlib.abc.Loader
2020-02-29 23:21:11 +02:00
Ran Benita 2f60548e08 Mark AssertionRewritingHook as implementing importlib.abc.Loader
It implements the required methods. This is useful for typing but also a
nice indicator.
2020-02-29 16:55:56 +02:00
Daniel Hahler f10ab021e2
Move _collectfile to FSCollector (#6830)
Previously this was implemented both on `Session` and `Package`, where
the extra code in `Package._collectfile` was not covered/used.

Ref: https://github.com/pytest-dev/pytest/pull/6830#issuecomment-592663236
2020-02-29 11:40:11 +01:00
Daniel Hahler d99bfc18b8
Update src/_pytest/config/findpaths.py
Co-Authored-By: Ran Benita <ran234@gmail.com>
2020-02-29 11:39:33 +01:00
Bruno Oliveira ff7b5dbbde
Merge pull request #6784 from nicoddemus/deprecate-terminal-writer
Deprecate TerminalReporter.writer
2020-02-28 21:07:02 -03:00
Daniel Hahler 4b53bbc0a9
docs: use doc/en/_build/html for html output (#6842)
This will use the same directory as `make -C doc/en` then, and reflects
the default location that Sphinx uses.
2020-02-29 00:47:30 +01:00
Daniel Hahler 769ffc32bf
Add Read The Docs badge to README (#6841) 2020-02-29 00:29:56 +01:00
Daniel Hahler 8128f4b3b8 Fix test_write_pyc: passed list to parseconfig 2020-02-28 20:40:39 +01:00
Daniel Hahler 6092d3c6e1 typing: parseconfig 2020-02-28 20:40:39 +01:00
Daniel Hahler 6c236767e0 Adjust/fix test_config: use strs with determine_setup 2020-02-28 20:40:39 +01:00
Daniel Hahler d2f9a73a29 typing: get_dirs_from_args 2020-02-28 19:58:15 +01:00
Daniel Hahler 5819536f00
Improve UsageError with invalid `-o` style (#6795)
This started from fixing the test, where `"xdist_strict True"` was used
as a single argument, although you typically would see `["xdist_strict",
"True"]`.

Improves the error message to mention the option that caused the error.
2020-02-28 19:41:56 +01:00
Daniel Hahler 952cab2d85
Simplify test_rootdir_wrong_option_arg (#6812) 2020-02-28 18:38:07 +01:00
Ran Benita d636fcd557 Add a typing-compatible mechanism for ad-hoc attributes on various objects
pytest has several instances where plugins set their own attributes on
objects they receive in hooks, like nodes and config. Since plugins are
detached from these object's definition by design, this causes a problem
for type checking because these attributes are not defined and mypy
complains.

Fix this by giving these objects a "store" which can be used by plugins
in a type-safe manner.

Currently this mechanism is private. We can consider exposing it at a
later point.
2020-02-28 14:34:44 +02:00
Daniel Hahler f77d606d4e
docs: generate index and add it to globaltoc sidebar (#6808) 2020-02-27 00:34:18 +01:00
Daniel Hahler 16c683dff9
Remove unused `setns` (#6804)
Last usage of it was removed in ba17363d7.
2020-02-26 15:35:14 +01:00
Daniel Hahler 2e48c32dea
docs: fix reference to config.cache fixture (#6807) 2020-02-26 01:24:18 +01:00
Stefano Mazzucco 2451716746
Remove reference to old konira plugin from docs (#6819)
The pytest-konira plugin has not seen an update since 2011, moreover
the "project description" on PyPI points to a dubious website that
does not actually correspond to the project and instead redirects to
advertising content.
2020-02-26 01:19:40 +01:00
Daniel Hahler eac933acde assertion: rewrite: only catch EnvironmentError
This was changed unintentionally in 45c4a8fb3 (pytest 5.3.0), but only
EnvironmentErrors might have `errno`.
Since that is not really guaranteed and it is good to have more
information this uses the string representation of the exc in the trace
message.
2020-02-25 17:29:30 +01:00
Daniel Hahler 6a7df7f031
test_assertion: harden/improve test_{text_diff,unicode} (#6806) 2020-02-24 15:19:08 +01:00
Daniel Hahler ac3a42bafd
doctest: strip newlines with unexpected exceptions (#6801) 2020-02-24 15:18:08 +01:00
Daniel Hahler be23aeb989
Remove unused `pytester.getdecoded` (#6805)
Last usage was removed in 22dc47d9f.
2020-02-24 14:33:26 +01:00
Daniel Hahler bfd0d18371
tests: test_config: move tests (#6796)
Originally added in a2891420d (with `TestRootdir`), but then
accidentally moved to `TestOverrideIniArgs` in 802755cee.
2020-02-23 17:12:55 +01:00