Skip to content

Commit 4de95de

Browse files
committed
2 parents 1046afa + 7b860c3 commit 4de95de

2 files changed

Lines changed: 13 additions & 20 deletions

File tree

test_add.py

Lines changed: 7 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,12 @@
1+
#writing test python code for testing conda yml
2+
def test_addition():
3+
assert 1 + 1 == 2
14

2-
# sum of numbers
3-
import unittest
4-
def addition(a,b):
5-
return a+b
5+
def test_subtraction():
6+
assert 5 - 3 == 2
67

7-
8-
print(addition(2,3)) # Expected output:
9-
# sum of numbers
10-
def addition(a, b):
11-
"""Return the sum of a and b."""
12-
return a + b
13-
14-
class TestAddition(unittest.TestCase):
15-
def test_basic(self):
16-
self.assertEqual(addition(2, 3), 5)
17-
self.assertEqual(addition(-1, 1), 0)
18-
self.assertEqual(addition(0, 0), 0)
19-
20-
if __name__ == "__main__":
21-
# Run the tests
22-
unittest.main()
8+
def test_multiplication():
9+
assert 5 * 2 == 10
2310

2411

2512

test_pl.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
#writing test python code for testing conda yml
2+
def test_addition():
3+
assert 1 + 1 == 2
4+
5+
def test_subtraction():
6+
assert 5 - 3 == 2

0 commit comments

Comments
 (0)