Skip to content

Commit 2bc806f

Browse files
committed
nose test & fixture for unittest (setup - teardown)
1 parent 9e934d8 commit 2bc806f

3 files changed

Lines changed: 3 additions & 2 deletions

File tree

requirements.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
nose==1.3.7
2+
pytest==6.2.4

test_unit_func.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
from sample_func import add, subtract, multiply, division
44

55

6-
class OneTest(unittest.TestCase):
6+
class TestOne(unittest.TestCase):
77
def test_add(self):
88
self.assertEqual(add(4, 9), 13)
99
self.assertEqual(add(-3, 9), 6)

test_unit_person.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
from person import Person
44

55

6-
class PersonTest(unittest.TestCase):
6+
class TestPerson(unittest.TestCase):
77

88
def setUp(self):
99
self.p1 = Person('rezoo', 'mob')

0 commit comments

Comments
 (0)