Skip to content

Commit

Permalink
linting
Browse files Browse the repository at this point in the history
  • Loading branch information
wohnlice committed Apr 3, 2024
1 parent baa2bd3 commit 5fd2e8c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
2 changes: 1 addition & 1 deletion pub/tools/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
NO_VALUE = "<<blank>>" # special marker
MAX_PUBS = 9000
# Biopython will put a count greater than 200 ids into a post, so we don't need to worry about request size
# But there does seem to be a 9999 limit either from Biopython or from NCBI.
# But there does seem to be a 9999 limit either from Biopython or from NCBI


VERSION = importlib.metadata.version('pub.tools')
9 changes: 6 additions & 3 deletions pub/tools/tests/test_entrez.py
Original file line number Diff line number Diff line change
Expand Up @@ -357,22 +357,25 @@ def test_print_electronic_pubmodel(self):
""" Both dates should be stored and the citation reflect it """
record = entrez.get_publication(pmid='10854512')
self.assertEqual(citations.journal_citation(html=True, publication=record),
'<span class="citation">Soon MS, Lin OS. Inflammatory fibroid polyp of the duodenum. <i>Surg Endosc</i> 2000 '
'<span class="citation">Soon MS, Lin OS. Inflammatory fibroid polyp of the duodenum. '
'<i>Surg Endosc</i> 2000 '
'Jan;14(1):86. Epub 1999 Nov 25.</span>')

def test_electronic_print_pubmodel(self):
""" Both dates should be stored but use electronic date for citation """
record = entrez.get_publication(pmid='14729922')
self.assertEqual(citations.journal_citation(html=True, publication=record),
'<span class="citation">Edgar RC. Local homology recognition and distance measures in linear time using '
'<span class="citation">Edgar RC. Local homology recognition and distance measures in '
'linear time using '
'compressed '
'amino acid alphabets. <i>Nucleic Acids Res</i> 2004 Jan 16;32(1):380-5. Print 2004.</span>')

def test_electronic_ecollection_pubmodel(self):
""" Both dates should be stored but use electronic date for citation """
record = entrez.get_publication(pmid='23372575')
self.assertEqual(citations.journal_citation(html=True, publication=record),
'<span class="citation">Wangari-Talbot J, Chen S. Genetics of melanoma. <i>Front Genet</i> 2013 '
'<span class="citation">Wangari-Talbot J, Chen S. Genetics of melanoma. <i>Front '
'Genet</i> 2013 '
'Jan 25;3:330. doi: '
'10.3389/fgene.2012.00330. eCollection 2012.</span>')

Expand Down

0 comments on commit 5fd2e8c

Please sign in to comment.