Skip to content

Commit 2bc806f

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

File tree

3 files changed

+3
-2
lines changed

3 files changed

+3
-2
lines changed

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)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy