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

MISC maintenance #65

Merged
merged 3 commits into from
Nov 8, 2020
Merged

MISC maintenance #65

merged 3 commits into from
Nov 8, 2020

Conversation

sappelhoff
Copy link
Member

@sappelhoff sappelhoff commented Nov 8, 2020

closes #55

I plan that this is the last PR before release 0.4 #60

@cbrnr
Copy link
Collaborator

cbrnr commented Nov 8, 2020

How does this work? You just add one parameter called tmpdir and that's it?

@sappelhoff
Copy link
Member Author

How does this work? You just add one parameter called tmpdir and that's it?

yes, and then pytest creates the directory, available from the pathlib.Path called tmpdir and also deletes that dir after the run succeeds or fails. Super convenient

@cbrnr
Copy link
Collaborator

cbrnr commented Nov 8, 2020

I don't think it cleans up after itself though, because it keeps the three most recently created directories. We might want to change that to delete a temp directory immediately (see pytest-dev/pytest#543 (comment)).

@sappelhoff
Copy link
Member Author

sappelhoff commented Nov 8, 2020

We might want to change that to delete a temp directory immediately

I thought that was a good idea and tried to add a setup.cfg like:

[tool:pytest]
tmp_keep=1

but it doesn't work, and this is why:

pytest-dev/pytest#543 (comment)

:)

EDIT: the 3 test directories that are being kept at most, eat up 63.7 MB in the /tmp directory. I don't know for how long they stay in that directory by system default - it sounds like something that is cleaned regularly by the OS.

@cbrnr
Copy link
Collaborator

cbrnr commented Nov 8, 2020

Should've read it till the end I guess 😉. LGTM!

@sappelhoff sappelhoff merged commit 18ca75f into bids-standard:master Nov 8, 2020
@sappelhoff sappelhoff deleted the maint branch November 8, 2020 16:13
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.

switch "manual" tempdirs for testing to pytest tmpdir fixtures
2 participants