Age | Commit message (Collapse) | Author |
|
This will enable a simplification in the next commit.
|
|
remove it
Makes it easier to understand with fewer methods.
|
|
Code is clearer this way.
|
|
When the stack is empty, the finalizers which are supposed to be
attached to nodes in the stack really ought to be empty as well. So the
code here is dead. If this doesn't happen, the assert will trigger.
|
|
Doesn't add much.
|
|
The setup stuff happens before the teardown stuff, so put it first so
that reading the code from top to bottom makes more sense.
|
|
attribute
This way it gets proper typing and decoupling.
|
|
|
|
|
|
|
|
|
|
The Twisted Logger will return an invalid file descriptor since it is
not backed by an FD. So, let's also forward this to the same code path
as with `pytest-xdist`.
|
|
Deprecate raising unittest.SkipTest to skip tests during collection
|
|
Minor code improvements in nose, unittest, skipping
|
|
It is not very clear why this code exists -- we are not running any
unittest or nose code during collection, and really these frameworks
don't have the concept of collection at all, and just raising these
exceptions at e.g. the module level would cause an error. So unless I'm
missing something, I don't think anyone is using this.
Deprecate it so we can eventually clear up this code and keep unittest
more tightly restricted to its plugin.
|
|
When `pytest.skip()` is called inside a test function, the skip location
should be reported as the line that made the call, however when
`pytest.skip()` is called by the `pytest.mark.skip` and similar
mechanisms, the location should be reported at the item's location,
because the exact location is some irrelevant internal code.
Currently the item-location case is implemented by the caller setting a
boolean key on the item's store and the `skipping` plugin checking it
and fixing up the location if needed. This is really roundabout IMO and
breaks encapsulation.
Instead, allow the caller to specify directly on the skip exception
whether to use the item's location or not. For now, this is entirely
private.
|
|
|
|
I was tempted to remove it, until I figured out why it was there.
|
|
|
|
* unittest: cleanup unexpected success handling
* update comment
|
|
pytest-dev/dependabot/pip/testing/plugins_integration/django-3.1.5
build(deps): bump django from 3.1.4 to 3.1.5 in /testing/plugins_integration
|
|
pytest-dev/dependabot/pip/testing/plugins_integration/pytest-mock-3.5.1
build(deps): bump pytest-mock from 3.4.0 to 3.5.1 in /testing/plugins_integration
|
|
Bumps [django](https://github.com/django/django) from 3.1.4 to 3.1.5.
- [Release notes](https://github.com/django/django/releases)
- [Commits](https://github.com/django/django/compare/3.1.4...3.1.5)
Signed-off-by: dependabot[bot] <support@github.com>
|
|
Bumps [pytest-mock](https://github.com/pytest-dev/pytest-mock) from 3.4.0 to 3.5.1.
- [Release notes](https://github.com/pytest-dev/pytest-mock/releases)
- [Changelog](https://github.com/pytest-dev/pytest-mock/blob/master/CHANGELOG.rst)
- [Commits](https://github.com/pytest-dev/pytest-mock/compare/v3.4.0...v3.5.1)
Signed-off-by: dependabot[bot] <support@github.com>
|
|
Add missing import into example script in documentation
|
|
|
|
doc: Add note about training early bird discount
|
|
|
|
DOC: Mark pytest module
|
|
Misc small code improvements
|
|
|
|
DOC: Update multiple references to testdir to pytester
|
|
Pytest document currently does not index the top-level package name
`pytest`, which causes some trouble when building documentation that
cross-refers to the pytest package via ``:mod:`pytest` ``.
|
|
I don't think it adds much value!
|
|
Keep knowledge of how the marker is stored encapsulated in one place.
|
|
|
|
|
|
In https://docs.pytest.org/en/stable/reference.html#testdir, it is
suggested:
> New code should avoid using testdir in favor of pytester.
Multiple spots in the documents still use testdir and they can be quite
confusing (especially the plugin writing guide).
|
|
pytest-dev#8204 migrate tests on testing/code/test_source to tmp_path
|
|
|
|
migrating some tests from tmpdir to tmp_path fixture
|
|
|
|
Not smart enough to understand the previous code.
|
|
Co-authored-by: Florian Bruhin <me@the-compiler.org>
Co-authored-by: Bruno Oliveira <nicoddemus@gmail.com>
|
|
* Fix failing staticmethod tests if they are inherited
* add comments, set default=None
|
|
christophebedard/add-missing-space-version-option-help-message
Add missing space in '--version' help message
|
|
* [pre-commit.ci] pre-commit autoupdate
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* manual fixes after configuration update
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Anthony Sottile <asottile@umich.edu>
|
|
Export pytest.Metafunc and pytest.Callinfo, hide NodeKeywords
|
|
coverage: Include code that runs in subprocesses
|
|
|