From 86086c6b4e6d6d154531b04a448d7aa479b383b2 Mon Sep 17 00:00:00 2001 From: Arthur Varkentin Date: Mon, 1 Jul 2024 15:48:21 +0200 Subject: [PATCH] test: create test_exists.py --- tests/test_exists.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 tests/test_exists.py diff --git a/tests/test_exists.py b/tests/test_exists.py new file mode 100644 index 00000000..f4129ef3 --- /dev/null +++ b/tests/test_exists.py @@ -0,0 +1,13 @@ +import unittest + +import numpy + +from dedupe.variables.exists import ExistsType + + +class TestExists(unittest.TestCase): + def test_comparator(self): + var = ExistsType("foo") + assert numpy.array_equal(var.comparator(None, None), [0, 0]) + assert numpy.array_equal(var.comparator(1, 1), [1, 0]) + assert numpy.array_equal(var.comparator(1, 0), [0, 1])