Skip to content

Commit 62231c5

Browse files
Fully support Python 3.11 (#104)
* Ensure tox envs that run tests depend on cmd extra * Fix test_report_gives_package_version on Python 3.11+ Fixes #94. See python/cpython#98771 and #94 (comment). * Add missing newline at end of pyct/tests/test_report.py * Test Python 3.11 and add it to the trove classifiers
1 parent 57021da commit 62231c5

File tree

3 files changed

+7
-6
lines changed

3 files changed

+7
-6
lines changed

pyct/tests/test_report.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@ class TestModule:
55
__version__ = "1.9.3"
66
__file__ = "/mock/opt/anaconda3/envs/pyct/lib/python3.7/site-packages/param/__init__.py"
77

8-
@patch("builtins.print")
98
@patch("importlib.import_module")
10-
def test_report_gives_package_version(mock_import_module, mock_print):
9+
@patch("builtins.print")
10+
def test_report_gives_package_version(mock_print, mock_import_module):
1111
module = TestModule()
1212
mock_import_module.return_value = module
1313

@@ -47,4 +47,4 @@ def test_report_gives_system_version(mock_platform, mock_print):
4747
def test_unknown_package_output(mock_print):
4848
report("fake_package")
4949

50-
mock_print.assert_called_with("fake_package=unknown # not installed in this environment")
50+
mock_print.assert_called_with("fake_package=unknown # not installed in this environment")

setup.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ def get_setup_version(root, reponame):
4747
'Programming Language :: Python :: 3.8',
4848
'Programming Language :: Python :: 3.9',
4949
'Programming Language :: Python :: 3.10',
50+
'Programming Language :: Python :: 3.11',
5051
'Development Status :: 4 - Beta'
5152
],
5253
author='HoloViz',

tox.ini

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[tox]
2-
envlist = {py36,py37,py38,py39,py310}-{flakes,unit,cmd_examples,build_examples,all}-{default}-{dev,pkg}
2+
envlist = {py36,py37,py38,py39,py310,py311}-{flakes,unit,cmd_examples,build_examples,all}-{default}-{dev,pkg}
33
build = wheel
44

55
[_flakes]
@@ -21,11 +21,11 @@ commands = {[_flakes]commands}
2121
{[_unit]commands}
2222
{[_cmd_examples]commands}
2323
{[_build_examples]commands}
24-
deps = .[examples, tests]
24+
deps = .[examples,tests,cmd]
2525

2626
[_unit]
2727
description = Run unit tests
28-
deps = .[tests]
28+
deps = .[tests,cmd]
2929
commands = pytest pyct
3030
pyct --help
3131
pyct --version

0 commit comments

Comments
 (0)