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

WIP Enable configuration of TOP_DIR #111

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

Conversation

gotcha
Copy link
Contributor

@gotcha gotcha commented Mar 22, 2021

used by default_filter_filename.

The test suite of my tool runs forked processes in a temporary directory (via tempfile.mkdtemp) which does not share the same root directory as the test suite.
This implies all calls are filtered out by default_filter_filename.

Adding the set_top_dir was enough to avoid filtering out.

This is a simple enough way to work around the little naive assumption made by:

TOP_DIR = os.path.join(os.getcwd(), '')     # current dir with trailing slash

Would you see a better solution ?

used by `default_filter_filename`.
Copy link
Contributor

@gvanrossum gvanrossum left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would put the function directly after the definition of the variables, so it's harder for a reader to miss that these are not really constants.

@gotcha
Copy link
Contributor Author

gotcha commented Mar 24, 2021

I have moved the definition of the variables closer to where they are used.

See #112 to avoid global vars while still enabling top_dir customization.

Solution: allow it to fail, following gvanrossum recommendation
to stop supporting 3.5
@CLAassistant
Copy link

CLAassistant commented Apr 16, 2022

CLA assistant check
All committers have signed the CLA.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants