Skip to content

Commit 68a478c

Browse files
committed
Support newer pytest versions, desupport Python 3.6
1 parent ee8a420 commit 68a478c

File tree

11 files changed

+98
-98
lines changed

11 files changed

+98
-98
lines changed

.github/workflows/main.yml

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,11 @@ on:
1313

1414
jobs:
1515
build:
16-
runs-on: ubuntu-20.04
16+
runs-on: ubuntu-22.04
1717

1818
strategy:
1919
matrix:
20-
python: ['3.6', '3.7', '3.8', '3.9', '3.10', 'pypy3.9']
20+
python: ['3.7', '3.8', '3.9', '3.10', 'py3.11', 'pypy3.9']
2121

2222
steps:
2323
- uses: actions/checkout@v3
@@ -32,34 +32,34 @@ jobs:
3232
- name: Install dependencies
3333
run: |
3434
python -m pip install --upgrade pip setuptools
35-
python -m pip install 'tox>=3.28,<4.0'
36-
37-
- name: Test with Python 3.6
38-
if: matrix.python == '3.6'
39-
run: tox -e 'py36-pytest{4,50,51,52,53,54,60,61,62,70}'
35+
python -m pip install 'tox>=4.4,<5'
4036
4137
- name: Test with Python 3.7
4238
if: matrix.python == '3.7'
43-
run: tox -e 'py37-pytest{4,50,51,52,53,54,60,61,62,70}'
39+
run: tox -e 'py37-pytest{4,5,60,61,62,70,71,72,73}'
4440

4541
- name: Test with Python 3.8
4642
if: matrix.python == '3.8'
47-
run: tox -e 'py38-pytest{4,50,51,52,53,54,60,61,62,70}'
43+
run: tox -e 'py38-pytest{4,5,60,61,62,70,71,72,73}'
4844

4945
- name: Test with Python 3.9
5046
if: matrix.python == '3.9'
51-
run: tox -e 'py39-pytest{4,50,51,52,53,54,60,61,62,70}'
47+
run: tox -e 'py39-pytest{4,5,60,61,62,70,71,72,73}'
5248

5349
- name: Test with Python 3.10
5450
if: matrix.python == '3.10'
55-
run: tox -e 'py310-pytest{62,70}'
51+
run: tox -e 'py310-pytest{62,70,71,72,73}'
52+
53+
- name: Test with Python 3.11
54+
if: matrix.python == '3.11'
55+
run: tox -e 'py311-pytest{73}'
5656

5757
- name: Test with PyPy 3.9
5858
if: matrix.python == 'pypy3.9'
59-
run: tox -e 'pypy39-pytest{4,50,51,52,53,54,60,61,62,70}'
59+
run: tox -e 'pypy39-pytest{4,5,60,61,62,70,71,72,73}'
6060

6161
- name: Linting with Flake8
62-
if: matrix.python == '3.9'
62+
if: matrix.python == '3.10'
6363
run: tox -e flake8
6464

6565
deploy:
@@ -76,7 +76,7 @@ jobs:
7676

7777
- uses: actions/setup-python@v4
7878
with:
79-
python-version: '3.9'
79+
python-version: '3.10'
8080

8181
- name: Install dependencies
8282
run: |

setup.py

Lines changed: 31 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -6,44 +6,40 @@
66

77

88
setup(
9-
name='pytest-describe',
10-
version='2.0.2',
11-
description='Describe-style plugin for pytest',
9+
name="pytest-describe",
10+
version="2.1.0",
11+
description="Describe-style plugin for pytest",
1212
long_description=readme,
13-
long_description_content_type='text/x-rst',
14-
url='https://github.com/pytest-dev/pytest-describe',
15-
author='Robin Pedersen',
16-
author_email='[email protected]',
17-
maintainer='Christoph Zwerschke',
18-
maintainer_email='[email protected]',
19-
license='MIT',
20-
license_file='LICENSE',
21-
platforms=['unix', 'linux', 'osx', 'cygwin', 'win32'],
22-
install_requires=[
23-
'pytest>=4.0,<7.1',
24-
],
13+
long_description_content_type="text/x-rst",
14+
url="https://github.com/pytest-dev/pytest-describe",
15+
author="Robin Pedersen",
16+
author_email="[email protected]",
17+
maintainer="Christoph Zwerschke",
18+
maintainer_email="[email protected]",
19+
license="MIT",
20+
license_file="LICENSE",
21+
platforms=["unix", "linux", "osx", "cygwin", "win32"],
22+
install_requires=["pytest>=4.6,<8"],
2523
entry_points={
26-
'pytest11': [
27-
'pytest-describe = pytest_describe.plugin',
28-
],
24+
"pytest11": ["pytest-describe = pytest_describe.plugin"],
2925
},
30-
packages=['pytest_describe'],
26+
packages=["pytest_describe"],
3127
classifiers=[
32-
'Development Status :: 4 - Beta',
33-
'Intended Audience :: Developers',
34-
'License :: OSI Approved :: MIT License',
35-
'Operating System :: POSIX',
36-
'Operating System :: Microsoft :: Windows',
37-
'Operating System :: MacOS :: MacOS X',
38-
'Topic :: Software Development :: Testing',
39-
'Topic :: Software Development :: Libraries',
40-
'Topic :: Utilities',
41-
'Programming Language :: Python :: 3',
42-
'Programming Language :: Python :: 3 :: Only',
43-
'Programming Language :: Python :: 3.6',
44-
'Programming Language :: Python :: 3.7',
45-
'Programming Language :: Python :: 3.8',
46-
'Programming Language :: Python :: 3.9',
47-
'Programming Language :: Python :: 3.10',
28+
"Development Status :: 4 - Beta",
29+
"Intended Audience :: Developers",
30+
"License :: OSI Approved :: MIT License",
31+
"Operating System :: POSIX",
32+
"Operating System :: Microsoft :: Windows",
33+
"Operating System :: MacOS :: MacOS X",
34+
"Topic :: Software Development :: Testing",
35+
"Topic :: Software Development :: Libraries",
36+
"Topic :: Utilities",
37+
"Programming Language :: Python :: 3",
38+
"Programming Language :: Python :: 3 :: Only",
39+
"Programming Language :: Python :: 3.7",
40+
"Programming Language :: Python :: 3.8",
41+
"Programming Language :: Python :: 3.9",
42+
"Programming Language :: Python :: 3.10",
43+
"Programming Language :: Python :: 3.11",
4844
],
4945
)

test/test_collect.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,13 @@
1-
import py
21
import re
32

4-
from util import assert_outcomes
3+
from util import assert_outcomes, Source
54

65
pytest_plugins = 'pytester'
76

87

98
def test_collect(testdir):
109
a_dir = testdir.mkpydir('a_dir')
11-
a_dir.join('test_a.py').write(py.code.Source("""
10+
a_dir.join('test_a.py').write(Source("""
1211
def describe_something():
1312
def is_foo():
1413
pass
@@ -44,7 +43,7 @@ def test_something():
4443

4544
def test_describe_evaluated_once(testdir):
4645
a_dir = testdir.mkpydir('a_dir')
47-
a_dir.join('test_something.py').write(py.code.Source("""
46+
a_dir.join('test_something.py').write(Source("""
4847
count = 0
4948
def describe_is_evaluated_only_once():
5049
global count

test/test_custom_prefix.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
1-
import py
21
import re
32

3+
from util import Source
4+
45
pytest_plugins = 'pytester'
56

67
ini = """
@@ -13,7 +14,7 @@ def test_collect_custom_prefix(testdir):
1314
testdir.makeini(ini)
1415

1516
a_dir = testdir.mkpydir('a_dir')
16-
a_dir.join('test_a.py').write(py.code.Source("""
17+
a_dir.join('test_a.py').write(Source("""
1718
def foo_scope():
1819
def bar_context():
1920
def passes():

test/test_fixtures.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
1-
import py
2-
from util import assert_outcomes
1+
from util import assert_outcomes, Source
32

43
pytest_plugins = 'pytester'
54

65

76
def test_can_access_local_fixture(testdir):
87
a_dir = testdir.mkpydir('a_dir')
9-
a_dir.join('test_a.py').write(py.code.Source("""
8+
a_dir.join('test_a.py').write(Source("""
109
import pytest
1110
1211
def describe_something():
@@ -24,7 +23,7 @@ def thing_is_42(thing):
2423

2524
def test_can_access_fixture_from_nested_scope(testdir):
2625
a_dir = testdir.mkpydir('a_dir')
27-
a_dir.join('test_a.py').write(py.code.Source("""
26+
a_dir.join('test_a.py').write(Source("""
2827
import pytest
2928
3029
def describe_something():
@@ -43,7 +42,7 @@ def thing_is_42(thing):
4342

4443
def test_local_fixture_overrides(testdir):
4544
a_dir = testdir.mkpydir('a_dir')
46-
a_dir.join('test_a.py').write(py.code.Source("""
45+
a_dir.join('test_a.py').write(Source("""
4746
import pytest
4847
4948
@pytest.fixture

test/test_marks.py

Lines changed: 14 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
1-
import py
2-
from util import assert_outcomes
1+
from util import assert_outcomes, Source
32

43
pytest_plugins = 'pytester'
54

65

76
def test_special_marks(testdir):
87
a_dir = testdir.mkpydir('a_dir')
9-
a_dir.join('test_a.py').write(py.code.Source("""
8+
a_dir.join('test_a.py').write(Source("""
109
import pytest
1110
1211
def describe_marks():
@@ -33,7 +32,7 @@ def isint(foo):
3332

3433
def test_multiple_variables_parametrize(testdir):
3534
a_dir = testdir.mkpydir('a_dir')
36-
a_dir.join('test_a.py').write(py.code.Source("""
35+
a_dir.join('test_a.py').write(Source("""
3736
import pytest
3837
3938
def describe_marks():
@@ -59,7 +58,7 @@ def isint_tuple_names(foo, bar):
5958

6059
def test_cartesian_parametrize(testdir):
6160
a_dir = testdir.mkpydir('a_dir')
62-
a_dir.join('test_a.py').write(py.code.Source("""
61+
a_dir.join('test_a.py').write(Source("""
6362
import pytest
6463
6564
def describe_marks():
@@ -77,7 +76,7 @@ def isint(foo, bar):
7776

7877
def test_parametrize_applies_to_describe(testdir):
7978
a_dir = testdir.mkpydir('a_dir')
80-
a_dir.join('test_a.py').write(py.code.Source("""
79+
a_dir.join('test_a.py').write(Source("""
8180
import pytest
8281
8382
@pytest.mark.parametrize('foo', (1, 2, 3))
@@ -102,7 +101,7 @@ def isint3(foo):
102101

103102
def test_cartesian_parametrize_on_describe(testdir):
104103
a_dir = testdir.mkpydir('a_dir')
105-
a_dir.join('test_a.py').write(py.code.Source("""
104+
a_dir.join('test_a.py').write(Source("""
106105
import pytest
107106
108107
@pytest.mark.parametrize('foo', (1, 2, 3))
@@ -120,7 +119,7 @@ def isint(foo, bar):
120119

121120
def test_parametrize_with_shared(testdir):
122121
a_dir = testdir.mkpydir('a_dir')
123-
a_dir.join('test_a.py').write(py.code.Source("""
122+
a_dir.join('test_a.py').write(Source("""
124123
import pytest
125124
from pytest import fixture
126125
from pytest_describe import behaves_like
@@ -151,7 +150,7 @@ def sound(foo):
151150

152151
def test_parametrize_with_shared_but_different_values(testdir):
153152
a_dir = testdir.mkpydir('a_dir')
154-
a_dir.join('test_a.py').write(py.code.Source("""
153+
a_dir.join('test_a.py').write(Source("""
155154
import pytest
156155
from pytest import fixture
157156
from pytest_describe import behaves_like
@@ -184,7 +183,7 @@ def sound(foo):
184183

185184
def test_coincident_parametrize_at_top(testdir):
186185
a_dir = testdir.mkpydir('a_dir')
187-
a_dir.join('test_a.py').write(py.code.Source("""
186+
a_dir.join('test_a.py').write(Source("""
188187
import pytest
189188
190189
@pytest.mark.parametrize('foo', (1, 2, 3))
@@ -207,7 +206,7 @@ def isint2(foo):
207206

208207
def test_keywords(testdir):
209208
a_dir = testdir.mkpydir('a_dir')
210-
a_dir.join('test_a.py').write(py.code.Source("""
209+
a_dir.join('test_a.py').write(Source("""
211210
import pytest
212211
def describe_a():
213212
@pytest.mark.foo
@@ -224,7 +223,7 @@ def bar_test():
224223

225224
def test_marks(testdir):
226225
a_dir = testdir.mkpydir('a_dir')
227-
a_dir.join('test_a.py').write(py.code.Source("""
226+
a_dir.join('test_a.py').write(Source("""
228227
import pytest
229228
def describe_a():
230229
@pytest.mark.foo
@@ -241,7 +240,7 @@ def bar_test():
241240

242241
def test_module_marks(testdir):
243242
a_dir = testdir.mkpydir('a_dir')
244-
a_dir.join('test_a.py').write(py.code.Source("""
243+
a_dir.join('test_a.py').write(Source("""
245244
import pytest
246245
pytestmark = [ pytest.mark.foo ]
247246
def describe_a():
@@ -257,7 +256,7 @@ def a_test():
257256

258257
def test_mark_at_describe_function(testdir):
259258
a_dir = testdir.mkpydir('a_dir')
260-
a_dir.join('test_a.py').write(py.code.Source("""
259+
a_dir.join('test_a.py').write(Source("""
261260
import pytest
262261
@pytest.mark.foo
263262
def describe_foo():
@@ -275,7 +274,7 @@ def b_test():
275274

276275
def test_mark_stacking(testdir):
277276
a_dir = testdir.mkpydir('a_dir')
278-
a_dir.join('test_a.py').write(py.code.Source("""
277+
a_dir.join('test_a.py').write(Source("""
279278
import pytest
280279
@pytest.fixture()
281280
def get_marks(request):

test/test_output.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
import py
1+
from util import Source
22

33
pytest_plugins = 'pytester'
44

55

66
def test_verbose_output(testdir):
77
a_dir = testdir.mkpydir('a_dir')
8-
a_dir.join('test_a.py').write(py.code.Source("""
8+
a_dir.join('test_a.py').write(Source("""
99
def describe_something():
1010
def describe_nested_ok():
1111
def passes():

0 commit comments

Comments
 (0)