Skip to content
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
merged 203 commits into from Feb 25, 2020
Merged

[WIP] Merge pytest-dev/pytest@master #142

merged 203 commits into from Feb 25, 2020

Conversation

blueyed
Copy link
Owner

@blueyed blueyed commented Dec 3, 2019

TODO:

blueyed and others added 7 commits November 10, 2019 00:21
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
@blueyed blueyed changed the title Merge upstream [WIP] Merge upstream Dec 3, 2019
cb109 and others added 10 commits December 6, 2019 08:40
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
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".
nicoddemus and others added 13 commits February 21, 2020 16:47
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).
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
@blueyed
Copy link
Owner Author

blueyed commented Feb 24, 2020

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
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet