Skip to content

Commit 6a0db7e

Browse files
committed
nose test & fixture for unittest (setup - teardown)
1 parent 8b1e220 commit 6a0db7e

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

test_nose.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,18 +7,18 @@ def test_add():
77
assert sample_func.add(0, 4) == 4
88

99

10-
def subtract(x, y):
10+
def subtract():
1111
assert sample_func.subtract(3, 4) == -1
1212
assert sample_func.subtract(-1, 4) == -5
1313
assert sample_func.subtract(0, 4) == -4
1414

1515

16-
def multiply(x, y):
16+
def multiply():
1717
assert sample_func.multiply(3, 4) == 12
1818
assert sample_func.multiply(3, 4) != 11
1919
assert sample_func.multiply(-1, 4) == -4
2020
assert sample_func.multiply(0, 4) == 0
2121

2222

23-
def division(x, y):
23+
def division():
2424
assert sample_func.multiply(12, 4) == 3

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