Skip to content

Commit

Permalink
Merge pull request #419 from PyAr/pymodern
Browse files Browse the repository at this point in the history
Added Python 3.11 and 3.12 to the github actions matrix.
  • Loading branch information
facundobatista authored Oct 20, 2023
2 parents 703d4b0 + 6e81bec commit 4cc250c
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 14 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ jobs:
run-tests:
strategy:
matrix:
os: [ubuntu-20.04, ubuntu-18.04, macos-10.15, macos-11, windows-2019, windows-2022]
python-version: [3.8, 3.9, "3.10"]
os: [ubuntu-20.04, ubuntu-22.04, macos-12, macos-11, windows-2019, windows-2022]
python-version: [3.8, 3.9, "3.10", "3.11", "3.12"]

runs-on: ${{ matrix.os }}
steps:
Expand Down
14 changes: 7 additions & 7 deletions fades/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -152,13 +152,13 @@ def get_interpreter_version(requested_interpreter):
current_interpreter = _get_interpreter_info()
logger.debug('Current interpreter is %s', current_interpreter)
if requested_interpreter is None:
return(current_interpreter, True)
else:
requested_interpreter = _get_interpreter_info(requested_interpreter)
is_current = requested_interpreter == current_interpreter
logger.debug('Interpreter=%s. It is the same as fades?=%s',
requested_interpreter, is_current)
return (requested_interpreter, is_current)
return (current_interpreter, True)

requested_interpreter = _get_interpreter_info(requested_interpreter)
is_current = requested_interpreter == current_interpreter
logger.debug('Interpreter=%s. It is the same as fades?=%s',
requested_interpreter, is_current)
return (requested_interpreter, is_current)


def get_latest_version_number(project_name):
Expand Down
11 changes: 6 additions & 5 deletions tests/test_infra.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@

import docutils.core
import pydocstyle
import pytest
import rst2html5_
from flake8.api.legacy import get_style_guide
from pyuca import Collator
Expand All @@ -37,13 +38,13 @@
logging.getLogger(logger_name).setLevel(logging.CRITICAL)


def test_flake8_pytest():
def test_flake8_pytest(capsys):
python_filepaths = get_python_filepaths(FLAKE8_ROOTS)
style_guide = get_style_guide(**FLAKE8_OPTIONS)
fake_stdout = io.StringIO()
with patch('sys.stdout', fake_stdout):
report = style_guide.check_files(python_filepaths)
assert report.total_errors == 0, "There are issues!\n" + fake_stdout.getvalue()
report = style_guide.check_files(python_filepaths)
if report.total_errors != 0:
out, _ = capsys.readouterr()
pytest.fail(f"There are {report.total_errors} issues!\n{''.join(out)}")


def test_pep257_pytest():
Expand Down

0 comments on commit 4cc250c

Please sign in to comment.