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

[feature] Improve test utils for report on files count #701

Merged
merged 1 commit into from
Sep 9, 2020

Conversation

woshilapin
Copy link
Contributor

Historically, in our test_utils framework, we test the number of files produced vs the number of files in the fixture and compare them. This sometimes leads to something like this kind of error.

image

This is not very helpful. So I changed it to a comparison of the 2 lists which would show something like this (more helpful I believe). Note that I used a BTreeSet instead of a Vec so the list is ordered and the diff much more helpful.

image

As a bonus, hidden files are also filtered. This was inconvenient when you're currently editing a file (like transfers.txt) because some editors like vim create a swap file (like .transfers.txt.swp).

Copy link
Member

@datanel datanel left a comment

Choose a reason for hiding this comment

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

much better indeed

@woshilapin woshilapin merged commit 909ccc4 into hove-io:master Sep 9, 2020
@woshilapin woshilapin deleted the improve-test-utils branch September 9, 2020 14:33
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.

3 participants