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

Fix pdb selftests on Python 3.13 #12885

Merged
merged 1 commit into from
Oct 13, 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
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ jobs:
- name: "ubuntu-py313"
python: "3.13-dev"
os: ubuntu-latest
tox_env: "py313"
tox_env: "py313-pexpect"
use_coverage: true
- name: "ubuntu-pypy3"
python: "pypy-3.9"
Expand Down
1 change: 1 addition & 0 deletions changelog/12497.contrib.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fixed two failing pdb-related tests on Python 3.13.
16 changes: 12 additions & 4 deletions testing/test_debugging.py
Original file line number Diff line number Diff line change
Expand Up @@ -771,9 +771,13 @@
x = 5
"""
)
if sys.version_info[:2] >= (3, 13):
break_line = "pytest.set_trace()"

Check warning on line 775 in testing/test_debugging.py

View check run for this annotation

Codecov / codecov/patch

testing/test_debugging.py#L775

Added line #L775 was not covered by tests
else:
break_line = "x = 5"
child = pytester.spawn(f"{sys.executable} {p1}")
child.expect("x = 5")
child.expect("Pdb")
child.expect_exact(break_line)
child.expect_exact("Pdb")

Check warning on line 780 in testing/test_debugging.py

View check run for this annotation

Codecov / codecov/patch

testing/test_debugging.py#L779-L780

Added lines #L779 - L780 were not covered by tests
child.sendeof()
self.flush(child)

Expand All @@ -788,9 +792,13 @@
pass
"""
)
if sys.version_info[:2] >= (3, 13):
break_line = "pytest.set_trace()"

Check warning on line 796 in testing/test_debugging.py

View check run for this annotation

Codecov / codecov/patch

testing/test_debugging.py#L796

Added line #L796 was not covered by tests
else:
break_line = "x = 5"
child = pytester.spawn_pytest(str(p1))
child.expect("x = 5")
child.expect("Pdb")
child.expect_exact(break_line)
child.expect_exact("Pdb")

Check warning on line 801 in testing/test_debugging.py

View check run for this annotation

Codecov / codecov/patch

testing/test_debugging.py#L800-L801

Added lines #L800 - L801 were not covered by tests
child.sendeof()
self.flush(child)

Expand Down
Loading