Browse Source

Added boolean identity and one testcase for it

remotes/origin/feature/feature-logical-operations
fdai7783 11 months ago
parent
commit
22b81b52f2
  1. 2
      src/main/py/logical_operations.py
  2. 17
      src/test/py/test_logical_operations.py

2
src/main/py/logical_operations.py

@ -0,0 +1,2 @@
def identity(a, b):
return a

17
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()
Loading…
Cancel
Save