Skip to content

Commit

Permalink
Merge pull request #665 from mgorny/2to3-test
Browse files Browse the repository at this point in the history
Ignore DeprecationWarnings to fix tests on py3.11
  • Loading branch information
hhatto authored Mar 3, 2023
2 parents 3555a19 + d54afbb commit 0415bed
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/python-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.7, 3.8, 3.9, "3.10", "pypy3.9"]
python-version: [3.7, 3.8, 3.9, "3.10", "3.11", "pypy3.9"]

steps:
- uses: actions/checkout@v3
Expand Down
5 changes: 3 additions & 2 deletions test/test_autopep8.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,13 +40,14 @@
)

if 'AUTOPEP8_COVERAGE' in os.environ and int(os.environ['AUTOPEP8_COVERAGE']):
AUTOPEP8_CMD_TUPLE = ('coverage', 'run', '--branch', '--parallel',
AUTOPEP8_CMD_TUPLE = (sys.executable, '-Wignore::DeprecationWarning',
'-m', 'coverage', 'run', '--branch', '--parallel',
'--omit=*/site-packages/*',
os.path.join(ROOT_DIR, 'autopep8.py'),)
else:
# We need to specify the executable to make sure the correct Python
# interpreter gets used.
AUTOPEP8_CMD_TUPLE = (sys.executable,
AUTOPEP8_CMD_TUPLE = (sys.executable, '-Wignore::DeprecationWarning',
os.path.join(ROOT_DIR,
'autopep8.py'),) # pragma: no cover

Expand Down
2 changes: 1 addition & 1 deletion tox.ini
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[tox]
envlist=py37,py38,py39,py310
envlist=py37,py38,py39,py310,py311
skip_missing_interpreters=True

[testenv]
Expand Down

0 comments on commit 0415bed

Please sign in to comment.