aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorMartin Czygan <martin.czygan@gmail.com>2020-12-15 02:39:35 +0100
committerMartin Czygan <martin.czygan@gmail.com>2020-12-15 02:39:35 +0100
commitf939949ae3889078ef2c9d77d1cffdd939e11435 (patch)
treeeeffa30293db814523582125f1b94c6e7e3517f5 /tests
parentb18c9c73150679a8e1ac92cd0bea7a649de0b39b (diff)
downloadfuzzycat-f939949ae3889078ef2c9d77d1cffdd939e11435.tar.gz
fuzzycat-f939949ae3889078ef2c9d77d1cffdd939e11435.zip
single item verification
Diffstat (limited to 'tests')
-rw-r--r--tests/data/verify.csv2
-rw-r--r--tests/test_utils.py2
2 files changed, 3 insertions, 1 deletions
diff --git a/tests/data/verify.csv b/tests/data/verify.csv
index e594223..74109ba 100644
--- a/tests/data/verify.csv
+++ b/tests/data/verify.csv
@@ -175,4 +175,4 @@ drzpue5r6zajlpa3fkyjdetuqy,fppfjl5kt5dsnfl2i5rarhqaaq,Status.DIFFERENT,CONTRIB_I
drzpue5r6zajlpa3fkyjdetuqy,zqqbuha3uzd2fcvekdy3ygxnni,Status.DIFFERENT,CONTRIB_INTERSECTION_EMPTY
fppfjl5kt5dsnfl2i5rarhqaaq,zqqbuha3uzd2fcvekdy3ygxnni,Status.DIFFERENT,CONTRIB_INTERSECTION_EMPTY
36e4mmbnlfg5tm5pz4zrokbxde,oxptehhpj5aihk2l42alqg55he,Status.EXACT,TITLE_AUTHOR_MATCH
-2t5mhzgf6vbirgjxmegaemyoqm,rj3fg7sudbbc5hgx5riruivhbm,Status.AMBIGUOUS,DUMMY
+2t5mhzgf6vbirgjxmegaemyoqm,rj3fg7sudbbc5hgx5riruivhbm,Status.AMBIGUOUS,
diff --git a/tests/test_utils.py b/tests/test_utils.py
index 38d50a7..fa930fe 100644
--- a/tests/test_utils.py
+++ b/tests/test_utils.py
@@ -64,6 +64,7 @@ def test_nwise():
assert list(nwise("1234", n=1)) == [("1", ), ("2", ), ("3", ), ("4", )]
assert list(nwise([1, 2, 3, 4, 5], n=3)) == [(1, 2, 3), (4, 5)]
+
def test_dict_key_exists():
assert dict_key_exists({}, "") is False
assert dict_key_exists({"a": "a"}, "a") == True
@@ -72,6 +73,7 @@ def test_dict_key_exists():
assert dict_key_exists({"a": {"b": None}}, "a.b") == True
assert dict_key_exists({"a": {"b": "c"}}, "a.b.c") == False
+
def test_page_page_string():
reject = ("", "123-2", "123-120", "123a-124", "-2-1")
for s in reject: