-
Notifications
You must be signed in to change notification settings - Fork 38
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
Conversation
The only test failures are coming from the diff generation; however, I also see some whitespace issues in astroquery that may be doctestplus related: |
Astroquery failure is unrelated to doctestplus, I commented on the Astroquery PR. Should we ping seberg about the diff generation? Thanks! |
Yeap, @seberg, would you mind having a look? |
I suspect the failures will be due to the whitespace thing we run into with astroquery, too. First item under this ancor: |
Hmmm, I suppose we have to read the actual indentation from the file then? Maybe something like: diff --git a/pytest_doctestplus/plugin.py b/pytest_doctestplus/plugin.py
index f9c3a0c..5538c53 100644
--- a/pytest_doctestplus/plugin.py
+++ b/pytest_doctestplus/plugin.py
@@ -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) EDIT: Sorry, first diff had a bug, this one should work. |
Thank you @seberg, it works like a dream. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great. Thanks, all! I'll let you merge. :)
I see test failures locally, but there is also a puzzling one for older pythons that I see in my dev environment, but not when I run the tests from tox, so ultimately we may run into some new cross incompatibility with some other plugin.
(This will need a changelog once some actual code changes are needed for incompatibility fixes, but not until all the diff stays within the territory of the tests)