Skip to content

Commit 1a1bc34

Browse files
committed
Reformatted test with black.
1 parent ea89ab5 commit 1a1bc34

File tree

1 file changed

+13
-7
lines changed

1 file changed

+13
-7
lines changed

tests/test_teardrop.py

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
import pytest
22
import cadquery as cq
3-
from plugins.teardrop import teardrop
3+
from plugins.teardrop import teardrop
44

55

66
@pytest.fixture
77
def box():
88
return cq.Workplane().box(8, 20, 20)
99

1010

11-
def test_teardrop_makes_a_hole(box):
11+
def test_teardrop_makes_a_hole(box):
1212
box_with_hole = box.faces(">X").workplane().teardrop(4).cutThruAll()
1313
assert box.faces().size() < box_with_hole.faces().size()
1414

@@ -18,19 +18,25 @@ def test_teardrop_rotation():
1818
r = cq.Workplane("XZ").teardrop(rad, 90,).extrude(5)
1919
assert r.size() == 1
2020

21-
#expect vertex of shape pointing in -X
21+
# expect vertex of shape pointing in -X
2222
x1 = r.vertices("<X").val().Center().x
23-
assert x1 == pytest.approx(-5.65685, rel=1e-3)
23+
assert x1 == pytest.approx(-5.65685, rel=1e-3)
2424

2525
r = cq.Workplane("XZ").teardrop(rad, -90,).extrude(5)
2626
x2 = r.vertices(">X").val().Center().x
27-
assert abs(x1 + x2) < 0.001
27+
assert abs(x1 + x2) < 0.001
28+
2829

2930
def test_teardrop_clip():
3031
r = cq.Workplane("XZ").teardrop(4, 0, 4.1).extrude(5)
3132
assert r.vertices(">Z").val().Center().z == pytest.approx(4.1, rel=1e-3)
3233

33-
@pytest.mark.parametrize("rad, clipval, reason", [(4, 4*2, "less"), (4, -4, "greater")])
34+
35+
@pytest.mark.parametrize(
36+
"rad, clipval, reason", [(4, 4 * 2, "less"), (4, -4, "greater")]
37+
)
3438
def test_teardrop_clip_value_illegal(box, rad, clipval, reason):
3539
with pytest.raises(ValueError, match=fr".* argument must be {reason} than .*"):
36-
box_with_hole = box.faces(">X").workplane().teardrop(rad,0,clipval).cutThruAll()
40+
box_with_hole = (
41+
box.faces(">X").workplane().teardrop(rad, 0, clipval).cutThruAll()
42+
)

0 commit comments

Comments
 (0)