Skip to content

Add support for Python 3.11 #274

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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -26,6 +26,8 @@ jobs:
toxenv: py39
- python-version: "3.10"
toxenv: py310
- python-version: "3.11"
toxenv: py311
steps:
- name: Checkout
uses: actions/checkout@v2
1 change: 1 addition & 0 deletions setup.py
Original file line number Diff line number Diff line change
@@ -49,6 +49,7 @@
'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: 3.9',
'Programming Language :: Python :: 3.10',
'Programming Language :: Python :: 3.11',
'Programming Language :: Python :: Implementation :: CPython',
'Programming Language :: Python :: Implementation :: PyPy',
'Topic :: Software Development :: Libraries :: Python Modules',
3 changes: 2 additions & 1 deletion tox.ini
Original file line number Diff line number Diff line change
@@ -4,14 +4,15 @@ testpaths = tests
norecursedirs = tests/django_example

[tox]
envlist = begin,py{py3,37,38,39,310},pytest,py38-django{lts,curr},end,quality
envlist = begin,py{py3,37,38,39,310,311},pytest,py38-django{lts,curr},end,quality

[gh-actions]
python =
3.7: py37,pytest
3.8: begin,py38,py38-django{lts,curr},end,quality
3.9: py39
3.10: py310
3.11: py311

[testenv]
deps =
8 changes: 8 additions & 0 deletions xmlrunner/result.py
Original file line number Diff line number Diff line change
@@ -188,6 +188,9 @@ def get_error_info(self):
"""
return self.test_exception_info

def shortDescription(self):
return self.test_description


class _XMLTestResult(TextTestResult):
"""
@@ -673,3 +676,8 @@ def generate_reports(self, test_runner):
def _exc_info_to_string(self, err, test):
"""Converts a sys.exc_info()-style tuple of values into a string."""
return super(_XMLTestResult, self)._exc_info_to_string(err, test)

def getDescription(self, test):
if isinstance(test, tuple):
test = test[0]
return super().getDescription(test)