Skip to content

Commit

Permalink
fix: python3.12 testing and linting
Browse files Browse the repository at this point in the history
  • Loading branch information
texastony committed Oct 30, 2023
1 parent 26fc488 commit 063c9b3
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 7 deletions.
9 changes: 9 additions & 0 deletions .github/workflows/ci_static-analysis.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,16 @@ jobs:
fail-fast: false
matrix:
category:
- mypy-py3
- bandit
- doc8
- readme
- docs
- flake8
- pylint
- flake8-tests
- pylint-tests
- black-check
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/ci_tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ jobs:
- 3.9
- "3.10"
- "3.11"
- "3.12"
- 3.x
category:
# Runs the base test environment
- py
Expand Down
2 changes: 1 addition & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ Getting Started
:class:`base64io.Base64IO` has no dependencies other than the standard library and and should
work with any version of Python greater than 2.6.
We test it on CPython 3.8, 3.9, 3.10, & 3.11.

Installation
============

Expand Down
3 changes: 1 addition & 2 deletions src/base64io/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -159,8 +159,7 @@ def _passthrough_interactive_check(self, method_name, mode):
):
return True
return False
else:
return method()
return method()

def writable(self):
# type: () -> bool
Expand Down
2 changes: 1 addition & 1 deletion test/unit/test_base64_stream.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ def test_base64io_always_false_methods(method_name):
assert not getattr(test, method_name)()


@pytest.mark.parametrize("method_name, args", (("fileno", ()), ("seek", (None,)), ("tell", ()), ("truncate", ())))
@pytest.mark.parametrize("method_name, args", (("fileno", ()), ("seek", (4,)), ("tell", ()), ("truncate", ())))
def test_unsupported_methods(method_name, args):
test = Base64IO(io.BytesIO())

Expand Down
9 changes: 6 additions & 3 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tox]
envlist =
py{38,39,310,311},
py{38,39,310,311,312},
bandit, doc8, readme,
mypy-py3,
flake8, pylint,
Expand All @@ -13,7 +13,8 @@ envlist =
# linters-tests :: Runs all linters over all tests.

[testenv:default-python]
basepython = python3
# 3.12 has pip issues, default to 3.11
basepython = python3.11

[testenv:base-command]
commands = pytest --basetemp={envtmpdir} -l --cov base64io {posargs}
Expand All @@ -26,7 +27,9 @@ passenv =
# Pass through twine password -- remove this once secrets-helper is fixed
# https://github.com/awslabs/secrets-helper/issues/15
TWINE_PASSWORD
deps = -rtest/requirements.txt
deps =
-rtest/requirements.txt
py312: pip>=23.3.1
commands = pytest --basetemp={envtmpdir} -l --cov base64io {posargs}

# mypy
Expand Down

0 comments on commit 063c9b3

Please sign in to comment.