Skip to content

Commit 0415bed

Browse files
authored
Merge pull request #665 from mgorny/2to3-test
Ignore DeprecationWarnings to fix tests on py3.11
2 parents 3555a19 + d54afbb commit 0415bed

3 files changed

Lines changed: 5 additions & 4 deletions

File tree

.github/workflows/python-package.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
runs-on: ubuntu-latest
1616
strategy:
1717
matrix:
18-
python-version: [3.7, 3.8, 3.9, "3.10", "pypy3.9"]
18+
python-version: [3.7, 3.8, 3.9, "3.10", "3.11", "pypy3.9"]
1919

2020
steps:
2121
- uses: actions/checkout@v3

test/test_autopep8.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,13 +40,14 @@
4040
)
4141

4242
if 'AUTOPEP8_COVERAGE' in os.environ and int(os.environ['AUTOPEP8_COVERAGE']):
43-
AUTOPEP8_CMD_TUPLE = ('coverage', 'run', '--branch', '--parallel',
43+
AUTOPEP8_CMD_TUPLE = (sys.executable, '-Wignore::DeprecationWarning',
44+
'-m', 'coverage', 'run', '--branch', '--parallel',
4445
'--omit=*/site-packages/*',
4546
os.path.join(ROOT_DIR, 'autopep8.py'),)
4647
else:
4748
# We need to specify the executable to make sure the correct Python
4849
# interpreter gets used.
49-
AUTOPEP8_CMD_TUPLE = (sys.executable,
50+
AUTOPEP8_CMD_TUPLE = (sys.executable, '-Wignore::DeprecationWarning',
5051
os.path.join(ROOT_DIR,
5152
'autopep8.py'),) # pragma: no cover
5253

tox.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[tox]
2-
envlist=py37,py38,py39,py310
2+
envlist=py37,py38,py39,py310,py311
33
skip_missing_interpreters=True
44

55
[testenv]

0 commit comments

Comments
 (0)