aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorMartin Czygan <martin.czygan@gmail.com>2020-12-09 14:04:46 +0100
committerMartin Czygan <martin.czygan@gmail.com>2020-12-09 14:04:46 +0100
commitb1118bb87efef2d4a5f252ced53f1c59246fec8e (patch)
tree5f6a4837df42b3c0e66087f3fd0954e81f303e12 /tests
parent3c7378e89687846fe7701212ba90194686990695 (diff)
downloadfuzzycat-b1118bb87efef2d4a5f252ced53f1c59246fec8e.tar.gz
fuzzycat-b1118bb87efef2d4a5f252ced53f1c59246fec8e.zip
add two more cases
Diffstat (limited to 'tests')
-rw-r--r--tests/data/release/3f3yt32rrbdzdewtcyrcyihgju60
-rw-r--r--tests/data/release/b7bbygyawzdsthai7j7rmztrxe32
-rw-r--r--tests/data/release/hxmxijrd3fgodd3q3crgt7d3c451
-rw-r--r--tests/data/release/mvvbim7kdffvtosuldtv5m3uy432
-rw-r--r--tests/data/verify.csv2
-rw-r--r--tests/test_verify.py2
6 files changed, 178 insertions, 1 deletions
diff --git a/tests/data/release/3f3yt32rrbdzdewtcyrcyihgju b/tests/data/release/3f3yt32rrbdzdewtcyrcyihgju
new file mode 100644
index 0000000..2feb19b
--- /dev/null
+++ b/tests/data/release/3f3yt32rrbdzdewtcyrcyihgju
@@ -0,0 +1,60 @@
+{
+ "abstracts": [],
+ "container_id": "ud7h2fmzczbshoux3s2pzgtf2q",
+ "contribs": [
+ {
+ "extra": {
+ "seq": "first"
+ },
+ "index": 0,
+ "raw_name": "Kuidong Xu",
+ "role": "author"
+ },
+ {
+ "index": 1,
+ "raw_name": "Joong Ki Choi",
+ "role": "author"
+ },
+ {
+ "index": 2,
+ "raw_name": "Eun Jin Yang",
+ "role": "author"
+ },
+ {
+ "index": 3,
+ "raw_name": "Kyu Chul Lee",
+ "role": "author"
+ },
+ {
+ "index": 4,
+ "raw_name": "Yanli Lei",
+ "role": "author"
+ }
+ ],
+ "ext_ids": {
+ "doi": "10.1016/s0025-326x(02)00090-5",
+ "pmid": "12405212",
+ "wikidata_qid": "Q53142806"
+ },
+ "extra": {
+ "crossref": {
+ "alternative-id": [
+ "S0025326X02000905"
+ ],
+ "type": "journal-article"
+ }
+ },
+ "ident": "3f3yt32rrbdzdewtcyrcyihgju",
+ "language": "en",
+ "pages": "877-886",
+ "publisher": "Elsevier BV",
+ "refs": [],
+ "release_stage": "published",
+ "release_type": "article-journal",
+ "release_year": 2002,
+ "revision": "2d34fb3a-2b9b-4f4b-9748-ac77a7c774da",
+ "state": "active",
+ "title": "Biomonitoring of coastal pollution status using protozoan communities with a modified PFU method",
+ "volume": "44",
+ "work_id": "usqag3t54jaghddclwakg7tgaq"
+}
diff --git a/tests/data/release/b7bbygyawzdsthai7j7rmztrxe b/tests/data/release/b7bbygyawzdsthai7j7rmztrxe
new file mode 100644
index 0000000..701f25c
--- /dev/null
+++ b/tests/data/release/b7bbygyawzdsthai7j7rmztrxe
@@ -0,0 +1,32 @@
+{
+ "abstracts": [],
+ "container_id": "mbtcy2nedvhizi6blcfehl2zaa",
+ "contribs": [],
+ "ext_ids": {
+ "jstor": "44062975"
+ },
+ "extra": {
+ "jstor": {
+ "issue_id": "i40168501",
+ "journal_ids": [
+ "jeducation",
+ "j50009610"
+ ]
+ }
+ },
+ "ident": "b7bbygyawzdsthai7j7rmztrxe",
+ "issue": "21 (1355)",
+ "language": "en",
+ "pages": "353",
+ "publisher": "New England Publishing Company",
+ "refs": [],
+ "release_date": "1901-11-28",
+ "release_stage": "published",
+ "release_type": "stub",
+ "release_year": 1901,
+ "revision": "e0b8f83c-d4b5-4ab2-87f8-a86da76fcb66",
+ "state": "active",
+ "title": "A NEW AID IN SCHOOL WORK",
+ "volume": "54",
+ "work_id": "qjgdl3apf5d45eh5f3wdab3gma"
+}
diff --git a/tests/data/release/hxmxijrd3fgodd3q3crgt7d3c4 b/tests/data/release/hxmxijrd3fgodd3q3crgt7d3c4
new file mode 100644
index 0000000..9d0593b
--- /dev/null
+++ b/tests/data/release/hxmxijrd3fgodd3q3crgt7d3c4
@@ -0,0 +1,51 @@
+{
+ "abstracts": [],
+ "contribs": [
+ {
+ "extra": {
+ "seq": "first"
+ },
+ "index": 0,
+ "raw_name": "J.K. Choi",
+ "role": "author"
+ },
+ {
+ "index": 1,
+ "raw_name": "K. Xu",
+ "role": "author"
+ },
+ {
+ "index": 2,
+ "raw_name": "E.J. Yang",
+ "role": "author"
+ },
+ {
+ "index": 3,
+ "raw_name": "K.C. Lee",
+ "role": "author"
+ },
+ {
+ "index": 4,
+ "raw_name": "Y. Lei",
+ "role": "author"
+ }
+ ],
+ "ext_ids": {
+ "doi": "10.1109/oceans.2003.178350"
+ },
+ "extra": {
+ "container_name": "Oceans 2003. Celebrating the Past ... Teaming Toward the Future (IEEE Cat. No.03CH37492)",
+ "crossref": {
+ "type": "proceedings-article"
+ }
+ },
+ "ident": "hxmxijrd3fgodd3q3crgt7d3c4",
+ "publisher": "IEEE",
+ "refs": [],
+ "release_type": "paper-conference",
+ "release_year": 2003,
+ "revision": "e049728c-a800-472f-9001-b5a09d556761",
+ "state": "active",
+ "title": "Biomonitoring of coastal pollution status using protozoan communities with a modified PFU method",
+ "work_id": "mlhtnjhxefeudk3ya57ksvxqim"
+}
diff --git a/tests/data/release/mvvbim7kdffvtosuldtv5m3uy4 b/tests/data/release/mvvbim7kdffvtosuldtv5m3uy4
new file mode 100644
index 0000000..9c06066
--- /dev/null
+++ b/tests/data/release/mvvbim7kdffvtosuldtv5m3uy4
@@ -0,0 +1,32 @@
+{
+ "abstracts": [],
+ "container_id": "mbtcy2nedvhizi6blcfehl2zaa",
+ "contribs": [],
+ "ext_ids": {
+ "jstor": "44054275"
+ },
+ "extra": {
+ "jstor": {
+ "issue_id": "i40168274",
+ "journal_ids": [
+ "jeducation",
+ "j50009610"
+ ]
+ }
+ },
+ "ident": "mvvbim7kdffvtosuldtv5m3uy4",
+ "issue": "22 (1356)",
+ "language": "en",
+ "pages": "383",
+ "publisher": "New England Publishing Company",
+ "refs": [],
+ "release_date": "1901-12-05",
+ "release_stage": "published",
+ "release_type": "stub",
+ "release_year": 1901,
+ "revision": "afeb3f72-484f-4459-9d52-c90ba316eefb",
+ "state": "active",
+ "title": "A NEW AID IN SCHOOL WORK",
+ "volume": "54",
+ "work_id": "v4yyq7zb7zc73jt7mpkhrczici"
+}
diff --git a/tests/data/verify.csv b/tests/data/verify.csv
index 1ea544b..8de9395 100644
--- a/tests/data/verify.csv
+++ b/tests/data/verify.csv
@@ -130,3 +130,5 @@ tmlg73royrdwdhl6nijf6m7vzy,3w4tibll4rdernjrn4hkkyqsem,Status.DIFFERENT,Miss.CONT
eqcgtpav3na5jh56o5vjsvb4ei,7x7tszf54zggvp4xkrhakp667u,Status.STRONG,OK.PMID_DOI_PAIR
wm2p5fznwffknjx56lvmr7hn4q,idpgijvcsnbqrgs2dg36vzzdzm,Status.DIFFERENT,Miss.SHARED_DOI_PREFIX
72uzveph65ce7kfdct2wpgh5j4,nqcfu4il45aixekvk3rwflahdm,Status.DIFFERENT,
+mvvbim7kdffvtosuldtv5m3uy4,b7bbygyawzdsthai7j7rmztrxe,Status.DIFFERENT,
+3f3yt32rrbdzdewtcyrcyihgju,hxmxijrd3fgodd3q3crgt7d3c4,Status.STRONG,
diff --git a/tests/test_verify.py b/tests/test_verify.py
index 75b1190..5a60326 100644
--- a/tests/test_verify.py
+++ b/tests/test_verify.py
@@ -38,7 +38,7 @@ def test_compare():
try:
a, b, expected_status, expected_reason = row
except ValueError as exc:
- pytest.fail("invalid test file, maybe missing a comma? {}".format(exc))
+ pytest.fail("invalid test file, maybe too many (or few) commas in row {}? {}".format(i + 1, exc))
status, reason = compare(load_release_ident(a), load_release_ident(b))
if not expected_status or expected_status.lower() == "todo":
logger.warning(