Repository navigation
Bugfix/fix use of assert 2015 - #2023
Conversation
Codecov Report
@@ Coverage Diff @@
## master #2023 +/- ##
==========================================
- Coverage 85.09% 84.16% -0.93%
==========================================
Files 314 296 -18
Lines 50311 47327 -2984
==========================================
- Hits 42810 39834 -2976
+ Misses 7501 7493 -8
Continue to review full report at Codecov.
|
Codecov Report
@@ Coverage Diff @@
## master #2023 +/- ##
==========================================
+ Coverage 85.09% 85.09% +<.01%
==========================================
Files 314 314
Lines 50311 50310 -1
==========================================
Hits 42810 42810
+ Misses 7501 7500 -1
Continue to review full report at Codecov.
|
peterjc
left a comment
There was a problem hiding this comment.
Generally looks very good - I only spotted a couple of issues by eye.
| assert False, "Should fail!" | ||
| except ValueError: | ||
| pass | ||
| raise ValueError("Should fail.") |
There was a problem hiding this comment.
I think you've accidentally flipped the meaning of the test. This looks like another case were we could use self.assertRaises(ValueError)?
There was a problem hiding this comment.
As this wasn't a part of a unittest TestCase, I've called the function directly instead of accessing via a reference to self. Not sure if it was the best way to go about it, or if a new TestCase would be more appropriate.
There was a problem hiding this comment.
You're absolutely right - I didn't see that from the context of the diff. Does this new form work nicely (I've never used it that way myself).
P.S. As per the comment at the start of that if statement, this code isn't a test, but rather a record of how some of the test cases were generated programatically (they are binary files).
There was a problem hiding this comment.
As far as I'm aware, it works equivalently and it appeared to work okay locally on my machine.
|
While we wait for the automated testing: Do you have strong views on a squash-and-merge as a single commit, versus keeping your full commit history, for this pull request? |
Nope, happy to squash-and-merge, makes everything cleaner 👍 |
|
I'll deal with the merge now (and the trivial conflict)... |
…se ValueError instead of assert call in EmbossIterator.
…on a base class, more descriptive ValueError and correcting misunderstood error.
e3b1331 to
3de5112
Compare
This was fixed in biopython#2015 / biopython#2023
Mainly replaced assert statements with raise ValueError instead.
This was fixed in biopython#2015 / biopython#2023
Named copyright holders and other contributors tracked with version control have all agreed: - Benjamin Rowell (@benjaminr) biopython#2023 - Brad Chapman (@chapmanb) http://mailman.open-bio.org/pipermail/biopython-dev/2013-July/019903.html - Chris Warth (@cswarth) biopython#898 (comment) - Christian Brueffer (@cbrueffer) biopython#898 (comment) - Eric Talevich (@etal) biopython#898 (comment) - Francesco Gastaldello (@Gasta88) biopython#1063 - Frank Kauff (@frankkl) biopython#2246 (comment) - Iddo Friedberg (@idoerg) biopython#898 (comment) - Joe Cora (@JoeCora) biopython#898 (comment) - Michiel de Hoon (@mdehoon) biopython#898 (comment) - Milind Luthra (@milindl) biopython#1020 - Nick Negretti (@nimne) biopython#1768 (comment) - Peter Cock (@peterjc) biopython#898 (comment) - Sourav Singh (@souravsingh) biopython#957 - Steve Bond (@biologyguy) biopython#898 (comment) - Tiago Antao (@tiagoantao) biopython#898 (comment) - Vincent Davis (@vincentdavis) biopython#898 (comment)
Named copyright holders and other contributors tracked with version control have all agreed: - Benjamin Rowell (@benjaminr) #2023 - Brad Chapman (@chapmanb) http://mailman.open-bio.org/pipermail/biopython-dev/2013-July/019903.html - Chris Warth (@cswarth) #898 (comment) - Christian Brueffer (@cbrueffer) #898 (comment) - Eric Talevich (@etal) #898 (comment) - Francesco Gastaldello (@Gasta88) #1063 - Frank Kauff (@frankkl) #2246 (comment) - Iddo Friedberg (@idoerg) #898 (comment) - Joe Cora (@JoeCora) #898 (comment) - Michiel de Hoon (@mdehoon) #898 (comment) - Milind Luthra (@milindl) #1020 - Nick Negretti (@nimne) #1768 (comment) - Peter Cock (@peterjc) #898 (comment) - Sourav Singh (@souravsingh) #957 - Steve Bond (@biologyguy) #898 (comment) - Tiago Antao (@tiagoantao) #898 (comment) - Vincent Davis (@vincentdavis) #898 (comment)
This pull request addresses issue #2015
I hereby agree to dual licence this and any previous contributions under both
the Biopython License Agreement AND the BSD 3-Clause License.
I have read the
CONTRIBUTING.rstfile and understand that AppVeyor andTravisCI will be used to confirm the Biopython unit tests and
flake8stylechecks pass with these changes.
I have added my name to the alphabetical contributors listings in the files
NEWS.rstandCONTRIB.rstas part of this pull request, am listedalready, or do not wish to be listed. (This acknowledgement is optional.)