-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconftest.py
More file actions
104 lines (75 loc) · 2.09 KB
/
conftest.py
File metadata and controls
104 lines (75 loc) · 2.09 KB
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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
import pytest
from src.Square import Square
from src.Triangle import Triangle
from src.Rectangle import Rectangle
from src.Circle import Circle
@pytest.fixture
def triangle():
triangle = Triangle(first_side=10.5, second_side=21, third_side=14)
yield triangle
del triangle
@pytest.fixture
def triangle_first_side_too_big():
triangle = Triangle(first_side=36, second_side=21, third_side=14)
yield triangle
del triangle
@pytest.fixture
def triangle_second_side_too_big():
triangle = Triangle(first_side=10.5, second_side=30, third_side=14)
yield triangle
del triangle
@pytest.fixture
def triangle_third_side_too_big():
triangle = Triangle(first_side=10.5, second_side=21, third_side=31.51)
yield triangle
del triangle
@pytest.fixture
def triangle_first_side_less_than_zero():
triangle = Triangle(first_side=-1, second_side=21, third_side=14)
yield triangle
del triangle
@pytest.fixture
def triangle_second_side_less_than_zero():
triangle = Triangle(first_side=10.5, second_side=-21, third_side=14)
yield triangle
del triangle
@pytest.fixture
def triangle_third_side_less_than_zero():
triangle = Triangle(first_side=10.5, second_side=21, third_side=-4.5)
yield triangle
del triangle
@pytest.fixture
def rectangle():
rectangle = Rectangle(length=20.1, width=30)
yield rectangle
del rectangle
@pytest.fixture
def rectangle_length_not_greater_than_zero():
rectangle = Rectangle(length=-20.1, width=30)
yield rectangle
del rectangle
@pytest.fixture
def rectangle_width_not_greater_than_zero():
rectangle = Rectangle(length=20.1, width=-1)
yield rectangle
del rectangle
@pytest.fixture
def square():
square = Square(side=21.4)
yield square
del square
@pytest.fixture
def square_side_not_greater_than_zero():
square = Square(side=0)
yield square
del square
@pytest.fixture
def circle():
circle = Circle(radius=11.5)
yield circle
del circle
@pytest.fixture
def circle_radius_not_greater_than_zero():
circle = Circle(radius=-1.5)
yield circle
del circle