diff --git a/src/main/py/logical_operations.py b/src/main/py/logical_operations.py index 179714b..3b519aa 100644 --- a/src/main/py/logical_operations.py +++ b/src/main/py/logical_operations.py @@ -6,7 +6,7 @@ def identity_disconjunctive(variable, operator, zero): def identity_conjunctive(variable, operator, zero): - if zero == 0 and operator == "+": + if zero == 1 and operator == ".": return variable else: return None diff --git a/src/test/py/test_logical_operations.py b/src/test/py/test_logical_operations.py index 364d887..b52791d 100644 --- a/src/test/py/test_logical_operations.py +++ b/src/test/py/test_logical_operations.py @@ -27,6 +27,9 @@ class calculationsWithRoots(unittest.TestCase): def test_conjunctive_identity_1_and_0_equals_None(self): self.assertEqual(identity_conjunctive(1, ".", 0), None) + def test_conjunctive_identity_1_and_0_equals_None(self): + self.assertEqual(identity_conjunctive(0, ".", 1), 0) + if __name__ == "__main__": unittest.main()