Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MAINT: adding python3.13 to CI and fix any incompatibilities #260

Merged
merged 3 commits into from
Aug 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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