Skip to content

Commit

Permalink
temp: debug the failure
Browse files Browse the repository at this point in the history
  • Loading branch information
nedbat committed Jul 30, 2024
1 parent 2a7d977 commit 28e349c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 2 additions & 1 deletion .github/workflows/python-nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ jobs:
set -xe
python -VV
python -m site
python -m sysconfig
python -c "import sys; print('GIL:', getattr(sys, '_is_gil_enabled', lambda: True)())"
python -m coverage debug sys
python -m coverage debug pybehave
Expand All @@ -115,4 +116,4 @@ jobs:
- name: "Run tox"
run: |
python -m tox -- -rfsEX
python -m tox -- -rfsEX -k short_stack
2 changes: 2 additions & 0 deletions tests/test_debug.py
Original file line number Diff line number Diff line change
Expand Up @@ -377,6 +377,7 @@ def test_short_stack_full(self) -> None:
py = "pypy" if env.PYPY else "python"
majv, minv = sys.version_info[:2]
pylib = f"lib{s}{py}{majv}.{minv}"
print(f"{stack_text = }")
assert len(re_lines(fr"{s}{pylib}{s}site-packages{s}_pytest", stack_text)) > 3
assert len(re_lines(fr"{s}{pylib}{s}site-packages{s}pluggy", stack_text)) > 3
assert not re_lines(r" 0x[0-9a-fA-F]+", stack_text) # No frame ids
Expand All @@ -386,6 +387,7 @@ def test_short_stack_full(self) -> None:
assert "f_one" in stack[-3]
assert "f_two" in stack[-2]
assert "f_three" in stack[-1]
1/0

def test_short_stack_short_filenames(self) -> None:
stack_text = f_one(full=True, short_filenames=True)
Expand Down

0 comments on commit 28e349c

Please sign in to comment.