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

Fix long test names with xdist #77

Merged

Conversation

godlygeek
Copy link
Contributor

This fixes the OSError caused by long capture file names in our temporary directory when --memray-bin-path is not in use by pytest-xdist is.

Relates-to: #68

Ensure that we can successfully use `pytest-xdist` in conjunction with
parametrized test functions with long names. This test fails as of this
commit, but passes once the next commit is applied.

Signed-off-by: Matt Wozniski <mwozniski@bloomberg.net>
When `pytest-xdist` is in use and `--memray-bin-path` isn't set, we need
to keep a temporary directory around even after each individual
distributed worker has completed. In this case, though, we don't need to
name our capture files based on the name of the test, since the user
didn't ask us to retain the capture files and so won't need to look at
them. This lets us use names of our own choosing, rather than names
derived from the test name, skirting filesystem limits on file name
length.

Signed-off-by: Matt Wozniski <mwozniski@bloomberg.net>
@godlygeek godlygeek self-assigned this Jun 5, 2023
Copy link
Contributor

@gaborbernat gaborbernat left a comment

Choose a reason for hiding this comment

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

@gaborbernat gaborbernat merged commit 2fe8ee2 into bloomberg:main Jun 6, 2023
10 checks passed
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

2 participants