pydantic / pydantic/pytest-examples
Clean up Needed
Open
Beginner friendly
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 178
- Forks
- 25
- Avg merge
- 4d 1h
- Merged PRs (30d)
- 7
Description
Here if the process times out, it is not terminated (https://docs.python.org/3/library/subprocess.html#subprocess.Popen.communicate).
Something like
p = Popen(args, stdin=PIPE, stdout=PIPE, stderr=PIPE, encoding='utf-8')
try:
stdout, stderr = p.communicate(example.source, timeout=10)
except subprocess.TimeoutExpired:
p.kill()
stdout, stderr = p.communicate()
could fix it.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at pytest_examples/lint.py lines 54-55 and read the linked Popen.communicate timeout documentation. Reproduce or inspect the timeout path, then ensure the subprocess is terminated and its remaining output is collected after TimeoutExpired. Done means timed-out examples do not leave a running process.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- testing-qa
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Active
- Clarity
- Clearly specified
- Newbie friendliness
- 84/100