From 22b81b52f2c27b821dc5da9ca6ef97d91ad4f67f Mon Sep 17 00:00:00 2001 From: fdai7783 Date: Sun, 4 Feb 2024 11:42:00 +0100 Subject: [PATCH] Added boolean identity and one testcase for it --- src/main/py/logical_operations.py | 2 ++ src/test/py/test_logical_operations.py | 17 +++++++++++++++++ 2 files changed, 19 insertions(+) create mode 100644 src/main/py/logical_operations.py create mode 100644 src/test/py/test_logical_operations.py diff --git a/src/main/py/logical_operations.py b/src/main/py/logical_operations.py new file mode 100644 index 0000000..a9e51a8 --- /dev/null +++ b/src/main/py/logical_operations.py @@ -0,0 +1,2 @@ +def identity(a, b): + return a diff --git a/src/test/py/test_logical_operations.py b/src/test/py/test_logical_operations.py new file mode 100644 index 0000000..4efdb64 --- /dev/null +++ b/src/test/py/test_logical_operations.py @@ -0,0 +1,17 @@ +import unittest +from src.main.py.logical_operations import * + + +class calculationsWithRoots(unittest.TestCase): + def setUp(self): + pass + + def tearDown(self): + pass + + def test_identity_x_and_0_equals_x(self): + self.assertEqual(identity(1, 0), 1) + + +if __name__ == "__main__": + unittest.main()