-
Notifications
You must be signed in to change notification settings - Fork 16
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
Prefixfix #32
base: missingfix
Are you sure you want to change the base?
Prefixfix #32
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
#execute with pytest | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It's a bit rude to just unilaterally decide that the tests will depend on pytest-specific features. (And, in fact, had you submitted this a year ago, I'd have asked you to rewrite it to be compatible with Nose.) That said, the API presented is quite appealing and I was already considering a move to pytest so I'm not going to rewrite it to the "Python stdlib only" subset I often aim for. |
||
|
||
from fastdupes import find_dupes | ||
|
||
def test_common_prefix(tmpdir): | ||
files = tmpdir.mkdir("files") | ||
file1 = files.join("file1") | ||
file2 = files.join("file2") | ||
file1.write("0"*1000000 + "1") | ||
file2.write("0"*1000000 + "2") | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It'd probably be better to either assert or use |
||
groups = find_dupes([str(files)]) | ||
assert len(groups) == 0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would you mind explaining why you made this no longer ensure that
limit
is positive?