Skip to content

Commit

Permalink
Merge pull request #260 from bsipocz/MAINT_py313
Browse files Browse the repository at this point in the history
MAINT: adding python3.13 to CI and fix any incompatibilities
  • Loading branch information
bsipocz authored Aug 28, 2024
2 parents 3d0e863 + 549cdbd commit 59f40a6
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 9 deletions.
14 changes: 7 additions & 7 deletions .github/workflows/python-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,20 +68,20 @@ jobs:
python-version: '3.12'
toxenv: py312-test-pytest82
- os: macos-latest
python-version: '3.12'
toxenv: py312-test-pytest82
python-version: '3.13-dev'
toxenv: py312-test-pytest83
- os: windows-latest
python-version: '3.12'
toxenv: py312-test-pytest82
python-version: '3.13-dev'
toxenv: py312-test-pytestdev
- os: macos-latest
python-version: '3.11'
toxenv: py311-test-pytestdev
- os: windows-latest
python-version: '3.11'
toxenv: py311-test-pytestdev
- os: ubuntu-latest
python-version: '3.12'
toxenv: py312-test-pytestdev-numpydev
- os: ubuntu-latest
python-version: '3.13-dev'
toxenv: py313-test-pytestdev

steps:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
Expand Down
1 change: 1 addition & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
==================

- Fixing output update for multiline code. [#253]
- Fixing Python 3.13 compatibility. [#260]
- Dropped ``setuptools`` as a runtime dependency. [#258]

1.2.1 (2024-03-09)
Expand Down
3 changes: 2 additions & 1 deletion pytest_doctestplus/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -900,7 +900,8 @@ def write_modified_file(fname, new_fname, changes):
lineno = change["test_lineno"] + change["example_lineno"]
lineno += change["source"].count("\n")

indentation = " " * change["nindent"]
indentation = len(text[lineno-1]) - len(text[lineno-1].lstrip())
indentation = text[lineno-1][:indentation]
want = indent(change["want"], indentation, lambda x: True)
# Replace fully blank lines with the required `<BLANKLINE>`
# (May need to do this also if line contains only whitespace)
Expand Down
3 changes: 2 additions & 1 deletion tox.ini
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tox]
envlist =
py{38,39,310,311,312}-test
py{38,39,310,311,312,313}-test
codestyle
requires =
setuptools >= 30.3.0
Expand Down Expand Up @@ -29,6 +29,7 @@ deps =
pytest80: pytest==8.0.*
pytest81: pytest==8.1.*
pytest82: pytest==8.2.*
pytest83: pytest==8.3.*
pytestdev: git+https://github.com/pytest-dev/pytest#egg=pytest
numpydev: numpy>=0.0.dev0

Expand Down

0 comments on commit 59f40a6

Please sign in to comment.