diff options
author | Bryan Newbold <bnewbold@robocracy.org> | 2021-11-02 17:55:15 -0700 |
---|---|---|
committer | Bryan Newbold <bnewbold@robocracy.org> | 2021-11-02 17:55:22 -0700 |
commit | 6fa2d38be243531747241a3ae602069d507368d9 (patch) | |
tree | 7cc81446a97a372640f6a189f09b88fa466e77ce /python/tests/import_pubmed.py | |
parent | 367b06f64546e4533662017c9dbe72aca175a294 (diff) | |
download | fatcat-6fa2d38be243531747241a3ae602069d507368d9.tar.gz fatcat-6fa2d38be243531747241a3ae602069d507368d9.zip |
lint: simple, safe inline lint fixes
'==' vs 'is'; 'not a in b' vs 'a not in b'; etc
Diffstat (limited to 'python/tests/import_pubmed.py')
-rw-r--r-- | python/tests/import_pubmed.py | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/python/tests/import_pubmed.py b/python/tests/import_pubmed.py index 10ded3fc..8b5ff3e5 100644 --- a/python/tests/import_pubmed.py +++ b/python/tests/import_pubmed.py @@ -50,19 +50,19 @@ def test_pubmed_xml_parse(pubmed_importer): r2 = pubmed_importer.parse_record(soup.find_all("PubmedArticle")[-1]) assert r1.title == "Hospital debt management and cost reimbursement" - assert r1.subtitle == None - assert r1.original_title == None - assert r1.publisher == None + assert r1.subtitle is None + assert r1.original_title is None + assert r1.publisher is None assert r1.release_type == "article-journal" assert r1.release_stage == "published" - assert r1.license_slug == None - assert r1.ext_ids.doi == None + assert r1.license_slug is None + assert r1.ext_ids.doi is None assert r1.ext_ids.pmid == "973217" assert r1.language == "en" assert r1.volume == "3" assert r1.issue == "1" assert r1.pages == "69-81" - assert r1.release_date == None # not "1976-12-03", which is medline ingest date + assert r1.release_date is None # not "1976-12-03", which is medline ingest date assert r1.release_year == 1976 # matched by ISSN, so shouldn't be in there? #assert extra['container_name'] == "Abstracts of the Papers Communicated to the Royal Society of London" @@ -77,18 +77,18 @@ def test_pubmed_xml_parse(pubmed_importer): assert not r1.refs assert r2.title == "Synthesis and Antibacterial Activity of Metal(loid) Nanostructures by Environmental Multi-Metal(loid) Resistant Bacteria and Metal(loid)-Reducing Flavoproteins" - assert r2.subtitle == None - assert r2.original_title == None - assert r2.publisher == None + assert r2.subtitle is None + assert r2.original_title is None + assert r2.publisher is None assert r2.release_type == "article-journal" assert r2.release_stage == "published" - assert r2.license_slug == None + assert r2.license_slug is None assert r2.ext_ids.doi == "10.3389/fmicb.2018.00959" assert r2.ext_ids.pmid == "29869640" assert r2.ext_ids.pmcid == "PMC5962736" assert r2.language == "en" assert r2.volume == "9" - assert r2.issue == None + assert r2.issue is None assert r2.pages == "959" assert str(r2.release_date) == "2018-05-15" assert r2.release_year == 2018 |