Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
ENH: stop using import_doi when testing format_bibtex with utf8 #121
Trying to resolve #119
I noticed that even without any changes, the test in question passes for me locally (python 3.6), so the errors may have been due to some temporary issue with querying zenodo.
I copy-pasted the output of format_bibtex() into the function test_format_bibtex_with_utf_characters(), so that this test won't fail when there is a problem with that zenodo query (rather than a problem with handling utf-8 in format_bibtex(), which we are explicitly testing for) - similar to what was done in test_format_bibtex_zenodo_doi().
On the other hand, perhaps testing whether import_doi() is successful should still be done?
@@ Coverage Diff @@ ## master #121 +/- ## ========================================== - Coverage 83.27% 83.23% -0.05% ========================================== Files 44 44 Lines 2308 2308 Branches 251 251 ========================================== - Hits 1922 1921 -1 Misses 316 316 - Partials 70 71 +1
Aug 16, 2017
5 checks passed
I agree, but I have no idea what exactly should be tested for import_doi. Whether it works with an arbitrary doi (thus failing also when the queried service produces an error, which can be good or bad, as the service can change its API or just have a downtime)? Whether it returns anything? Whether it returns a correct data type (at least for python 2 and unicode entries, unicode object is required for encode/decode to work in other functions)?