Skip to content

Commit 4db4c12

Browse files
committed
default precision problem?
1 parent e2b9b82 commit 4db4c12

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

tests/compas/test_tolerance.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,19 @@
11
from compas.tolerance import TOL
2+
from compas.tolerance import Tolerance
23
from compas.geometry import Point
34

45

6+
def test_tolerance_default_tolerance():
7+
TOL.precision == Tolerance.PRECISION
8+
9+
510
def test_tolerance_format_number():
611
assert TOL.format_number(0, precision=3) == "0.000"
712
assert TOL.format_number(0.5, precision=3) == "0.500"
813
assert TOL.format_number(float(0), precision=3) == "0.000"
914

10-
# Using default precision
15+
16+
def test_tolerance_format_number_with_default_precision():
1117
assert TOL.format_number(0) == "0.000"
1218
assert TOL.format_number(0.5) == "0.500"
1319
assert TOL.format_number(float(0)) == "0.000"

0 commit comments

Comments
 (0)