Gallopsled / Gallopsled/pwntools

Sphinx doctest failure output does not include line number

Open
#2,778 0 comments 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
Python
Stars
13.7k
Forks
1.9k
Avg merge
6d 23h
Merged PRs (30d)
3

Description

Failing tests in CI don't include the line number where the failing code is from in the error message. This makes it annoying to debug the failing tests when the line content is ambiguous.

```
File "elf/corefile.rst", line ?, in default
Failed example:
libc = ELF(which('bash')).libc
Exception raised:
Traceback (most recent call last):
```

Maybe our own monkey patches to the doctest runner play a role in this?
https://github.com/Gallopsled/pwntools/blob/dev/docs/source/conf.py

Contributor guide

Open the contributing guide

Research direction

Start in docs/source/conf.py and reproduce the failing Sphinx doctest from CI. Check whether the doctest runner customization there affects location reporting for the example in elf/corefile.rst. Done means the failure output includes the relevant source line number and the doctest still runs successfully otherwise.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
documentation, testing-qa
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
68/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.