aboutsummaryrefslogtreecommitdiffstats
path: root/python/tests/test_utils.py
diff options
context:
space:
mode:
Diffstat (limited to 'python/tests/test_utils.py')
-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"]