-
-
Notifications
You must be signed in to change notification settings - Fork 44
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
Too long filenames cause test failure #57
Comments
yeah this is especially prevalent on macos where the temporary directory is some wildly deep thing by default. I wanted to fix this with a "smart" truncation but hadn't found time to implement an algorithm for it, something which partially preserves the folder names similar to what you'd see in a sparkline that said, fixing this wasn't very high priority since it rarely appears in normal usage (usually you're not passing fully qualified paths to a text editor) and was mostly only impacting the tests |
Description
This demonstrates failure mode of some tests, where the temporary directory path generated by pytest is too long to fully fit into the header. (encountered on MacOS)
This leads to the assertions on the visible contents to fail. For example: looking for the modified indicator ' *', or exact match on the filename or particular part of it.
Example breaking test
The top of the resulting screen:
Possible solution
The filename should probably be truncated in a consistent manner, without hiding the indicator or other such information.
This is also what nano does:
Currently failing tests
Running with
pytest tests/ -k fake
:The text was updated successfully, but these errors were encountered: