Skip to content

Merge the features branch into master, before stopping to use it #6716

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

Merged
merged 153 commits into from
Feb 12, 2020

Conversation

bluetech
Copy link
Member

The features branch is no more. Development of features is now also done on master.

See #6571.

blueyed and others added 30 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
This feature was added in commit
007a77c, but was never used in pytest
itself. A GitHub code search doesn't find any users either (only pytest
repo copies). It seems safe to clean up.
minor: move internal _pformat_dispatch function
testing/python/metafunc.py: import _idval once
Fixes pytest-dev#759

- Adjust test_parametrized_ids_invalid_type, create list to convert tuples
  Ref: pytest-dev#1857 (comment)

- Changelog for int to str conversion
  Ref: pytest-dev#1857 (comment)
Respect --fulltrace with collection errors
parametrized: ids: support generator/iterator
Add type annotations to _pytest.config.argparsing and corresponding Config code
Resolves pytest-dev#4445 and pytest-dev#5928 (thanks to allanlewis)

Add CHANGELOG for location parameter
pytester: remove special handling of env during inner runs
…st-dev/pytest/pytest-dev#4445

Add acceptance tests for "config warnings" stacklevel (pytest-dev#4445)
_idval: remove trailing newline from exception
Sets `PY_COLORS=0` in the environment by default, which is used by pylib.

Via blueyed#58

(initially cherry picked from commit f153ad3)
pytester: use no colors with inline runs by default
blueyed and others added 23 commits February 1, 2020 23:48
`Generator` was removed in 7eb28f9, and this pleases mypy to correctly
complain that `FunctionMixin` has no `config` (within
`_prunetraceback`).

* typing: _prunetraceback

* minor: imports, typing
)

Plugins specified with ``-p`` are now loaded after internal plugins, which
results in their hooks being called *before* the internal ones.

This makes the ``-p`` behavior consistent with ``PYTEST_PLUGINS``.

* fix/adjust test_disable_plugin_autoload
* adjust test_plugin_loading_order
Every argname used in `parametrize` either must
be declared explicitly in the python test function, or via
`indirect` list

Fix pytest-dev#5712
This started by looking at how to get the current test item in general,
and then I noticed that it is not necessary for the capture plugin to
track it manually in the first place.
Fix mypy errors:

src/_pytest/runner.py:36: error: "addoption" of "OptionGroup" does not return a value  [func-returns-value]
src/_pytest/helpconfig.py:64: error: "addoption" of "OptionGroup" does not return a value  [func-returns-value]
src/_pytest/terminal.py:67: error: "_addoption" of "OptionGroup" does not return a value  [func-returns-value]
src/_pytest/terminal.py:75: error: "_addoption" of "OptionGroup" does not return a value  [func-returns-value]
Remove unused field FixtureManager._arg2finish
This class was both added and became unused during the development of a
PR:
pytest-dev#3317
ExitCode is used in several internal modules and hooks and so with type
annotations added, needs to be imported a lot.

_pytest.main, being the entry point, generally sits at the top of the
import tree.

So, it's not great to have ExitCode defined in _pytest.main, because it
will cause a lot of import cycles once type annotations are added (in
fact there is already one, which this change removes).

Move it to _pytest.config instead.

_pytest.main still imports ExitCode, so importing from there still
works, although external users should really be importing from `pytest`.
Move ExitCode's definition from _pytest.main to _pytest.config
Conflicts:
	src/_pytest/main.py
	src/_pytest/mark/structures.py
	src/_pytest/python.py
	testing/test_main.py
	testing/test_parseopt.py
* Use code highlighting if pygments is installed

* Use colorama constants instead of bare ascii codes

Could not find the exact equivalent of 'hl-reset' code using colorama
constants though.

* Refactor ASCII color handling into a fixture

* Revert back to using explicit color codes

* In Python 3.5 skip rest of tests that require ordered markup in colored output
The features branch is no more. Development of features is now also done
on master.

See pytest-dev#6571.
@nicoddemus
Copy link
Member

nicoddemus commented Feb 12, 2020

Thanks! Just to make sure, was this a clean merge?

@bluetech
Copy link
Member Author

The only conflict was the features in the GitHub Action config:

(and also one below). I resolved by removing it in the merge.

@nicoddemus
Copy link
Member

Awesome, let's get this in then! 😁

@nicoddemus nicoddemus merged commit d79179a into pytest-dev:master Feb 12, 2020
@bluetech bluetech deleted the features-to-master-for-real branch February 28, 2020 12:08
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.