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

Refactor GenBank tests #3291

Closed

Conversation

Andrey-Raspopov
Copy link
Contributor

  • 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.rst file, have run pre-commit locally,
    and understand that AppVeyor and TravisCI will be used to confirm the Biopython unit
    tests and style checks pass with these changes.

  • I have added my name to the alphabetical contributors listings in the files
    NEWS.rst and CONTRIB.rst as part of this pull request, am listed
    already, or do not wish to be listed. (This acknowledgement is optional.)

Good morning!

I've taken several attempts at refactoring GenBank library, but it is truly a complex task, so I've decided to start from the other end. This commit is focused on moving test data away from the test logic and of course is a subject of a discussion.

@codecov
Copy link

codecov bot commented Oct 2, 2020

Codecov Report

Merging #3291 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #3291   +/-   ##
=======================================
  Coverage   83.98%   83.98%           
=======================================
  Files         318      318           
  Lines       51660    51660           
=======================================
  Hits        43389    43389           
  Misses       8271     8271           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 4e77946...5f0e105. Read the comment docs.

@peterjc
Copy link
Member

peterjc commented Oct 2, 2020

What do you think @mdehoon? We started with a print-and-compare test, where a string representation the expected parser output was held in a text file. Then in #2124 you refactored to use the unittest framework with the expected parser output as python datatypes. Here it moves the expected output externally again, but into a JSON file.

If I was doing this from scratch, I'd probably start with a single file where all the parsed values are verified, supplemented by specific tests of corner cases (e.g. strange line wrapping, value-less qualifiers, atypical line breaks in structured comments, expected warnings from bad locations, bad quotes, ...).

(Update: fixed typo)

@Andrey-Raspopov Andrey-Raspopov deleted the RefactorGenbankTests branch November 24, 2021 08:39
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.

None yet

2 participants