forked from pytest-dev/pytest
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[WIP] Merge pytest-dev/pytest@master #142
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Fixes pytest-dev#5991 Fixes pytest-dev#3823 Ref: pytest-dev/pytest-django#772 Ref: pytest-dev#1890 Ref: pytest-dev/pytest-django#782 - inject wrapped testMethod - adjust test_trial_error - add test for `--trace` with unittests
- Isolate logic for getting expected exceptions - Use original method name, as users see it when entering the debugger
Otherwise 'normal' failures won't call teardown explicitly
rename test_pdb to test_debugging
Update mypy 0.740 -> 0.750
unittest: do not use TestCase.debug() with `--pdb`
Merge master into features
Co-Authored-By: Bruno Oliveira <nicoddemus@gmail.com>
Co-Authored-By: Bruno Oliveira <nicoddemus@gmail.com>
As discussed, sometimes we will need to introduce changes which are not necessarily removals but might break existing suites
Co-Authored-By: Anthony Sottile <asottile@umich.edu> Co-Authored-By: Bruno Oliveira <nicoddemus@gmail.com> Co-Authored-By: Hugo van Kemenade <hugovk@users.noreply.github.com>
…-breakage Deprecation policy - insert considerations for breaking changes
pytest-dev#4597: tee-stdio capture method
An improvement seems more adequate here.
Change 4639 from feature to improvement
…-matching-case-insensitive Make keyword expression matching case-insensitive
As far as the output is concerned, they are both identical so it doesn't make sense to have both. setup, teardown, and collect failures are already reported as "errors", "E".
Updated Dynamic Scopes Documentation
Passing in a tuple crashes in `_prepareconfig`: def test_invoke_with_tuple(self): > pytest.main(("-h",)) src/_pytest/config/__init__.py:82: in main config = _prepareconfig(args, plugins) src/_pytest/config/__init__.py:229: in _prepareconfig return pluginmanager.hook.pytest_cmdline_parse( … src/_pytest/helpconfig.py:98: in pytest_cmdline_parse config = outcome.get_result() # type: Config src/_pytest/config/__init__.py:808: in pytest_cmdline_parse self.parse(args) src/_pytest/config/__init__.py:1017: in parse self._preparse(args, addopts=addopts) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ def _preparse(self, args: List[str], addopts: bool = True) -> None: … if addopts: ini_addopts = self.getini("addopts") if ini_addopts: > args[:] = self._validate_args(ini_addopts, "via addopts config") + args E TypeError: can only concatenate list (not "tuple") to list addopts = True args = ('-h',) env_addopts = '' ini_addopts = ['-rfEX', …] src/_pytest/config/__init__.py:956: TypeError: can only concatenate list (not "tuple") to list Might be worth handling (converting it to a list for example), but it was documented to be a list to begin with when removing support for strings (a7e4016).
- Add list of fixtures to start of fixture chapter - Add "fixture" cross ref type
It should only return `True` when something is to be ignored, not `False` otherwise typically. This caused e.g. bad interaction with the cacheprovider (before pytest-dev#6448).
Last usage was removed in 22dc47d.
blueyed
added a commit
that referenced
this pull request
Feb 24, 2020
Closes #142. Conflicts: src/_pytest/_code/code.py src/_pytest/_io/__init__.py src/_pytest/assertion/util.py src/_pytest/cacheprovider.py src/_pytest/capture.py src/_pytest/doctest.py src/_pytest/main.py src/_pytest/nodes.py src/_pytest/python.py src/_pytest/terminal.py src/_pytest/tmpdir.py src/_pytest/unittest.py testing/conftest.py testing/python/metafunc.py testing/test_assertion.py testing/test_cacheprovider.py testing/test_main.py testing/test_pytester.py testing/test_runner.py testing/test_terminal.py testing/test_unittest.py testing/test_warnings.py
Redone from scratch, without rerere cache (old HEAD: 6361c32). |
Closes #142. Conflicts: src/_pytest/_code/code.py src/_pytest/_io/__init__.py src/_pytest/assertion/util.py src/_pytest/cacheprovider.py src/_pytest/capture.py src/_pytest/doctest.py src/_pytest/main.py src/_pytest/nodes.py src/_pytest/python.py src/_pytest/terminal.py src/_pytest/tmpdir.py src/_pytest/unittest.py testing/conftest.py testing/python/metafunc.py testing/test_assertion.py testing/test_cacheprovider.py testing/test_main.py testing/test_pytester.py testing/test_runner.py testing/test_terminal.py testing/test_unittest.py testing/test_warnings.py
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
TODO:
[ ] revert/check faea273-k
(Make keyword expression matching case-insensitive pytest-dev/pytest#6316 (comment))