mirror of
https://github.com/gumyr/build123d.git
synced 2025-12-06 02:30:55 -08:00
Updating positions tests
This commit is contained in:
parent
2d82b2ca5c
commit
82aa0aa367
2 changed files with 2 additions and 5 deletions
|
|
@ -373,10 +373,7 @@ class Mixin1D(Shape[TOPODS]):
|
|||
def _to_param(edge_wire: Mixin1D, value: float | VectorLike, name: str) -> float:
|
||||
"""Convert a float or VectorLike into a curve parameter."""
|
||||
if isinstance(value, (int, float)):
|
||||
if edge_wire.is_forward:
|
||||
return float(value)
|
||||
else:
|
||||
return 1.0 - float(value)
|
||||
try:
|
||||
point = Vector(value)
|
||||
except TypeError as exc:
|
||||
|
|
|
|||
|
|
@ -166,7 +166,7 @@ class TestMixin1D(unittest.TestCase):
|
|||
def test_positions_deflection_failure(self):
|
||||
e = Edge.make_circle(1.0)
|
||||
|
||||
with patch("build123d.edge.GCPnts_UniformDeflection") as MockDefl:
|
||||
with patch("build123d.topology.one_d.GCPnts_UniformDeflection") as MockDefl:
|
||||
instance = MockDefl.return_value
|
||||
instance.IsDone.return_value = False
|
||||
instance.NbPoints.return_value = 0
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue