-
Notifications
You must be signed in to change notification settings - Fork 1
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
Converting tests to pytests discovers duplicated test code #21
Comments
It's been years for me haha 😅 Looking at the function name I guess the 2 tests are identical except for how they pass the file argument to the destream class. Probably at some point one was using a filename instead of a file object. It has to work for both (if that still exists in the API). But don't take my word for it, try to use git blame on the file and see if they ever were different. |
Why convert to pytest at all? |
The syntax with And it looks like touching the whole test codebase could show up some issues like this one :-) |
I do prefer py.test too! I'm not sure it even existed when this project started. Overall it's a nice improvement as it is easier to get in the code. |
And in the meantime it even dropped the dot from |
But first, #22 needs to be reviewed/approved/merged. |
Fair enough! |
Why didn't this get closed with #27? |
Does it have to be a commit message? I remember closing issues with PR messages like this one from our PR that I expected to close this issue: |
Pretty sure (80%) it has to be in the commit message or the title of the commit (which is actually part of the message). Some words also don't close the linked issue. For instance: "Related #21" will link but not close when the PR gets merged. |
Found it: in the PR number 19 I wrote |
During the attempt to convert the test suite to PyTest, I have discovered, that the two tests:
test_10_passing_file_object
test_20_passing_filename
from
destream/tests/test_10_base.py
Lines 50 to 64 in 00f9fab
were identical. What should be the difference between them, @cecton ?
The text was updated successfully, but these errors were encountered: