We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent edee14f commit e2b9b82Copy full SHA for e2b9b82
tests/compas/test_tolerance.py
@@ -1,6 +1,18 @@
1
from compas.tolerance import TOL
2
+from compas.geometry import Point
3
4
5
def test_tolerance_format_number():
6
assert TOL.format_number(0, precision=3) == "0.000"
7
assert TOL.format_number(0.5, precision=3) == "0.500"
8
+ assert TOL.format_number(float(0), precision=3) == "0.000"
9
+
10
+ # Using default precision
11
+ assert TOL.format_number(0) == "0.000"
12
+ assert TOL.format_number(0.5) == "0.500"
13
+ assert TOL.format_number(float(0)) == "0.000"
14
15
16
+def test_tolerance_format_point():
17
+ point = Point(0, 0, 0)
18
+ assert str(point) == "Point(x=0.000, y=0.000, z=0.000)"
0 commit comments