-
Notifications
You must be signed in to change notification settings - Fork 0
/
tests_operations.py
77 lines (62 loc) · 1.64 KB
/
tests_operations.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
from operations import (
addition,
subtraction,
multiplication,
division,
exponentiation,
modulo,
)
def test_addition():
"""
GIVEN: Two numbers
WHEN: passed in to the function addition
THEN: the resulting is the addition of the two numbers
"""
# assert addition(12, 12) == 24
pass
def test_subtraction():
"""
GIVEN: Two numbers
WHEN: passed in to the function subtraction
THEN: the resulting is the subtraction of the two numbers
"""
# assert subtraction(7, 10) == -3
pass
def test_multiplication():
"""
GIVEN: Two numbers
WHEN: passed in to the function multiplication
THEN: the resulting is the multiplication of the two numbers
"""
# assert multiplication(3, 5) == 15
pass
def test_division():
"""
GIVEN: Two numbers
WHEN: passed in to the function division
THEN: the resulting is the division of the two number
"""
# assert division(8, 4) == 2
pass
def test_division_exception_on_zero():
"""
GIVEN: Two numbers
WHEN: passed in to the function division
THEN: the resulting is the division of the two number
Hint: https://stackoverflow.com/questions/23337471/how-to-properly-assert-that-an-exception-gets-raised-in-pytest
"""
pass
def test_exponentiation():
"""
GIVEN: Two numbers
WHEN: passed in to the function exponentiation
THEN: the resulting is the exponentiation of the two number
"""
pass
def test_modulo():
"""
GIVEN: Two numbers
WHEN: passed in to the function modulo
THEN: the resulting is the modulo of the two number
"""
pass