Skip to content

Commit d74baf4

Browse files
authored
Merge pull request #9042 from nicoddemus/backport-9040
2 parents fafe00a + d9b8f7c commit d74baf4

13 files changed

+28
-35
lines changed

Diff for: .github/workflows/main.yml

+4-4
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,15 @@ name: main
33
on:
44
push:
55
branches:
6-
- master
6+
- main
77
- "[0-9]+.[0-9]+.x"
88
tags:
99
- "[0-9]+.[0-9]+.[0-9]+"
1010
- "[0-9]+.[0-9]+.[0-9]+rc[0-9]+"
1111

1212
pull_request:
1313
branches:
14-
- master
14+
- main
1515
- "[0-9]+.[0-9]+.x"
1616

1717
# Set permissions at the job level.
@@ -64,7 +64,7 @@ jobs:
6464
- name: "windows-py37-pluggy"
6565
python: "3.7"
6666
os: windows-latest
67-
tox_env: "py37-pluggymaster-xdist"
67+
tox_env: "py37-pluggymain-xdist"
6868
- name: "windows-py38"
6969
python: "3.8"
7070
os: windows-latest
@@ -91,7 +91,7 @@ jobs:
9191
- name: "ubuntu-py37-pluggy"
9292
python: "3.7"
9393
os: ubuntu-latest
94-
tox_env: "py37-pluggymaster-xdist"
94+
tox_env: "py37-pluggymain-xdist"
9595
- name: "ubuntu-py37-freeze"
9696
python: "3.7"
9797
os: ubuntu-latest

Diff for: CONTRIBUTING.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,7 @@ Here is a simple overview, with pytest-specific bits:
236236
$ cd pytest
237237
# now, create your own branch off "master":
238238

239-
$ git checkout -b your-bugfix-branch-name master
239+
$ git checkout -b your-bugfix-branch-name main
240240

241241
Given we have "major.minor.micro" version numbers, bug fixes will usually
242242
be released in micro releases whereas features will be released in
@@ -318,7 +318,7 @@ Here is a simple overview, with pytest-specific bits:
318318
compare: your-branch-name
319319

320320
base-fork: pytest-dev/pytest
321-
base: master
321+
base: main
322322

323323

324324
Writing Tests

Diff for: README.rst

+8-4
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
.. image:: https://docs.pytest.org/en/stable/_static/pytest1.png
1+
.. image:: https://github.com/pytest-dev/pytest/raw/main/doc/en/img/pytest_logo_curves.svg
22
:target: https://docs.pytest.org/en/stable/
33
:align: center
44
:alt: pytest
@@ -15,7 +15,7 @@
1515
.. image:: https://img.shields.io/pypi/pyversions/pytest.svg
1616
:target: https://pypi.org/project/pytest/
1717

18-
.. image:: https://codecov.io/gh/pytest-dev/pytest/branch/master/graph/badge.svg
18+
.. image:: https://codecov.io/gh/pytest-dev/pytest/branch/main/graph/badge.svg
1919
:target: https://codecov.io/gh/pytest-dev/pytest
2020
:alt: Code coverage Status
2121

@@ -25,6 +25,10 @@
2525
.. image:: https://github.com/pytest-dev/pytest/workflows/main/badge.svg
2626
:target: https://github.com/pytest-dev/pytest/actions?query=workflow%3Amain
2727

28+
.. image:: https://results.pre-commit.ci/badge/github/pytest-dev/pytest/main.svg
29+
:target: https://results.pre-commit.ci/latest/github/pytest-dev/pytest/master
30+
:alt: pre-commit.ci status
31+
2832
.. image:: https://img.shields.io/badge/code%20style-black-000000.svg
2933
:target: https://github.com/psf/black
3034

@@ -149,8 +153,8 @@ Tidelift will coordinate the fix and disclosure.
149153
License
150154
-------
151155

152-
Copyright Holger Krekel and others, 2004-2020.
156+
Copyright Holger Krekel and others, 2004-2021.
153157

154158
Distributed under the terms of the `MIT`_ license, pytest is free and open source software.
155159

156-
.. _`MIT`: https://github.com/pytest-dev/pytest/blob/master/LICENSE
160+
.. _`MIT`: https://github.com/pytest-dev/pytest/blob/main/LICENSE

Diff for: doc/en/development_guide.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@ Development Guide
44

55
The contributing guidelines are to be found :ref:`here <contributing>`.
66
The release procedure for pytest is documented on
7-
`GitHub <https://github.com/pytest-dev/pytest/blob/master/RELEASING.rst>`_.
7+
`GitHub <https://github.com/pytest-dev/pytest/blob/main/RELEASING.rst>`_.

Diff for: doc/en/funcarg_compare.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ pytest for a long time offered a pytest_configure and a pytest_sessionstart
168168
hook which are often used to setup global resources. This suffers from
169169
several problems:
170170

171-
1. in distributed testing the master process would setup test resources
171+
1. in distributed testing the managing process would setup test resources
172172
that are never needed because it only co-ordinates the test run
173173
activities of the worker processes.
174174

Diff for: doc/en/license.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,4 +29,4 @@ Distributed under the terms of the `MIT`_ license, pytest is free and open sourc
2929
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
3030
SOFTWARE.
3131
32-
.. _`MIT`: https://github.com/pytest-dev/pytest/blob/master/LICENSE
32+
.. _`MIT`: https://github.com/pytest-dev/pytest/blob/main/LICENSE

Diff for: doc/en/reference.rst

+1-4
Original file line numberDiff line numberDiff line change
@@ -920,11 +920,8 @@ TestReport
920920
_Result
921921
~~~~~~~
922922

923-
Result used within :ref:`hook wrappers <hookwrapper>`.
923+
Result object used within :ref:`hook wrappers <hookwrapper>`, see :py:class:`_Result in the pluggy documentation <pluggy._callers._Result>` for more information.
924924

925-
.. autoclass:: pluggy.callers._Result
926-
.. automethod:: pluggy.callers._Result.get_result
927-
.. automethod:: pluggy.callers._Result.force_result
928925

929926
Global Variables
930927
----------------

Diff for: doc/en/requirements.txt

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
pallets-sphinx-themes
2+
pluggy>=1.0
23
pygments-pytest>=1.1.0
34
sphinx-removed-in>=0.2.0
45
sphinx>=3.1,<4

Diff for: setup.cfg

+1-1
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ install_requires =
4545
attrs>=19.2.0
4646
iniconfig
4747
packaging
48-
pluggy>=0.12,<1.0.0a1
48+
pluggy>=0.12,<2.0
4949
py>=1.8.2
5050
toml
5151
atomicwrites>=1.0;sys_platform=="win32"

Diff for: testing/python/metafunc.py

+1-4
Original file line numberDiff line numberDiff line change
@@ -448,10 +448,7 @@ def test_idmaker_enum(self) -> None:
448448
enum = pytest.importorskip("enum")
449449
e = enum.Enum("Foo", "one, two")
450450
result = idmaker(("a", "b"), [pytest.param(e.one, e.two)])
451-
if sys.version_info[:2] >= (3, 10):
452-
assert result == ["one-two"]
453-
else:
454-
assert result == ["Foo.one-Foo.two"]
451+
assert result == ["Foo.one-Foo.two"]
455452

456453
def test_idmaker_idfn(self) -> None:
457454
"""#351"""

Diff for: testing/test_config.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1780,7 +1780,7 @@ class DummyPlugin:
17801780
)
17811781
def test_config_blocked_default_plugins(pytester: Pytester, plugin: str) -> None:
17821782
if plugin == "debugging":
1783-
# Fixed in xdist master (after 1.27.0).
1783+
# Fixed in xdist (after 1.27.0).
17841784
# https://github.com/pytest-dev/pytest-xdist/pull/422
17851785
try:
17861786
import xdist # noqa: F401

Diff for: testing/test_pytester.py

+4-10
Original file line numberDiff line numberDiff line change
@@ -741,16 +741,10 @@ def test_run_result_repr() -> None:
741741

742742
# known exit code
743743
r = pytester.RunResult(1, outlines, errlines, duration=0.5)
744-
if sys.version_info[:2] >= (3, 10):
745-
assert repr(r) == (
746-
"<RunResult ret=TESTS_FAILED len(stdout.lines)=3"
747-
" len(stderr.lines)=4 duration=0.50s>"
748-
)
749-
else:
750-
assert repr(r) == (
751-
"<RunResult ret=ExitCode.TESTS_FAILED len(stdout.lines)=3"
752-
" len(stderr.lines)=4 duration=0.50s>"
753-
)
744+
assert (
745+
repr(r) == "<RunResult ret=ExitCode.TESTS_FAILED len(stdout.lines)=3"
746+
" len(stderr.lines)=4 duration=0.50s>"
747+
)
754748

755749
# unknown exit code: just the number
756750
r = pytester.RunResult(99, outlines, errlines, duration=0.5)

Diff for: tox.ini

+2-2
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ envlist =
1111
py39
1212
py310
1313
pypy3
14-
py37-{pexpect,xdist,unittestextras,numpy,pluggymaster}
14+
py37-{pexpect,xdist,unittestextras,numpy,pluggymain}
1515
doctesting
1616
plugins
1717
py37-freeze
@@ -47,7 +47,7 @@ deps =
4747
doctesting: PyYAML
4848
numpy: numpy>=1.19.4
4949
pexpect: pexpect>=4.8.0
50-
pluggymaster: git+https://github.com/pytest-dev/pluggy.git@master
50+
pluggymain: pluggy @ git+https://github.com/pytest-dev/pluggy.git
5151
pygments>=2.7.2
5252
unittestextras: twisted
5353
unittestextras: asynctest

0 commit comments

Comments
 (0)