aboutsummaryrefslogtreecommitdiffstats
path: root/python/tests
diff options
context:
space:
mode:
authorMartin Czygan <martin.czygan@gmail.com>2021-06-02 20:53:29 +0200
committerMartin Czygan <martin.czygan@gmail.com>2021-06-02 20:53:29 +0200
commit36671f1f20211c2fa84f03dc2e1187d2cc8f8551 (patch)
tree17f585d81ed9a77860a9d21ac281c93b542e880c /python/tests
parent4c49d94b8c6907e2887a6a5be43c74eeb825931e (diff)
downloadrefcat-36671f1f20211c2fa84f03dc2e1187d2cc8f8551.tar.gz
refcat-36671f1f20211c2fa84f03dc2e1187d2cc8f8551.zip
update docs
Diffstat (limited to 'python/tests')
-rw-r--r--python/tests/test_utils.py23
1 files changed, 16 insertions, 7 deletions
diff --git a/python/tests/test_utils.py b/python/tests/test_utils.py
index 79c8919..acc1888 100644
--- a/python/tests/test_utils.py
+++ b/python/tests/test_utils.py
@@ -10,19 +10,24 @@ def test_extract_urls():
assert extract_urls("http://a.com/b") == ["http://a.com/b"]
assert extract_urls("https://a.com/b") == ["https://a.com/b"]
assert extract_urls("http=://a.com/b") == ["a.com/"]
- assert extract_urls("http://www.bioinformatics.babraham.ac.uk/projects/fastqc/") == ["http://www.bioinformatics.babraham.ac.uk/projects/fastqc/"]
+ assert extract_urls("http://www.bioinformatics.babraham.ac.uk/projects/fastqc/") == [
+ "http://www.bioinformatics.babraham.ac.uk/projects/fastqc/"
+ ]
+ assert extract_urls(
+ "CertificaçãoDigitalNº1311532/CA40/005129/2012Apensadoao40/006810/2011-1ºTermoAditivonº52/2012aoContratonº282/2011-Celebradoem08/08/2012"
+ ) == []
assert extract_urls(
- "CertificaçãoDigitalNº1311532/CA40/005129/2012Apensadoao40/006810/2011-1ºTermoAditivonº52/2012aoContratonº282/2011-Celebradoem08/08/2012") == []
- assert extract_urls("http://www.brookings.edu/~/media/Research/Files/Papers/2015/04/global-drug-policy/Caulkinsfinal.pdf?la=en") == [
"http://www.brookings.edu/~/media/Research/Files/Papers/2015/04/global-drug-policy/Caulkinsfinal.pdf?la=en"
- ]
+ ) == ["http://www.brookings.edu/~/media/Research/Files/Papers/2015/04/global-drug-policy/Caulkinsfinal.pdf?la=en"]
assert extract_urls("DOI:10.1093/forestry/cpr048") == []
assert extract_urls("www.dtic.mil/cgi-bin/GetTRDoc?Location=U2&doc=GetTRDoc.pdf&AD=ADA475228") == [
"www.dtic.mil/cgi-bin/GetTRDoc?Location=U2&doc=GetTRDoc.pdf&AD=ADA475228"
]
assert extract_urls("http://bit.ly/cJbkv") == ["http://bit.ly/cJbkv"]
assert extract_urls("hello http://bit.ly/cJbkv") == ["http://bit.ly/cJbkv"]
- assert extract_urls("hello http://bit.ly/cJbkv http://bit.ly/cJbkv") == ["http://bit.ly/cJbkv", "http://bit.ly/cJbkv"]
+ assert extract_urls("hello http://bit.ly/cJbkv http://bit.ly/cJbkv") == [
+ "http://bit.ly/cJbkv", "http://bit.ly/cJbkv"
+ ]
assert extract_urls("jul./set.de") == ["set.de"]
@@ -35,7 +40,11 @@ def test_extract_doi():
assert extract_dois("!!10.1080/00335630.2012.714899") == ["10.1080/00335630.2012.714899"]
assert extract_dois("!!10.1177/1075547007306508.!") == ["10.1177/1075547007306508"]
assert extract_dois("!!445!!10.3390/nu6114822") == ["10.3390/nu6114822"]
- assert extract_dois("!0141-9889,!pp.!448-464!doi:!10.1111/j.1467J9566.2010.01286.!") == ["10.1111/j.1467J9566.2010.01286"]
- assert extract_dois("!10.1002/(SICI)1097-4679(200004)56:4<519::AID-JCLP6>3.0.CO") == ["10.1002/(SICI)1097-4679(200004)56:4<519::AID-JCLP6>3.0.CO"]
+ assert extract_dois("!0141-9889,!pp.!448-464!doi:!10.1111/j.1467J9566.2010.01286.!") == [
+ "10.1111/j.1467J9566.2010.01286"
+ ]
+ assert extract_dois("!10.1002/(SICI)1097-4679(200004)56:4<519::AID-JCLP6>3.0.CO") == [
+ "10.1002/(SICI)1097-4679(200004)56:4<519::AID-JCLP6>3.0.CO"
+ ]
assert extract_dois("!10.1002/ajpa.20674.!") == ["10.1002/ajpa.20674"]
assert extract_dois("!10.1002/chem.201700953.!") == ["10.1002/chem.201700953"]