pypa / pypa/scripttest

Add option to disable pre/post-test base directory traversal

Open
#21 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
Python
Stars
59
Forks
20
PR merge metrics
No merged PRs in 30d

Description

Currently in TestFileEnvironment.run() we walk the entire script directory before and after execution of the process. In general this is probably much less optimal than we could be - individual tests could assert for specific expected files.

We should take a parameter in __init__ to allow disabling this behavior.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Read scripttest.py at TestFileEnvironment.run() and its init method, focusing on the linked pre- and post-execution directory traversal. Confirm the existing behavior remains the default, while the new option disables both traversals when requested.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
cli, testing
Issue type
Feature
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.