Skip to content

Commit

Permalink
Fix global precision in two test files bleeding to other tests
Browse files Browse the repository at this point in the history
  • Loading branch information
yck011522 committed Jul 11, 2024
1 parent f7d962a commit f4fc159
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
5 changes: 5 additions & 0 deletions tests/compas/files/test_gltf.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
from compas.files import GLTFContent
from compas.tolerance import TOL

# Temporary change the global precision in the TOL class to 12
TOL.precision = 12

BASE_FOLDER = os.path.dirname(__file__)
Expand Down Expand Up @@ -175,3 +176,7 @@ def test_gltf_content():
assert len(node_0.children) == 0
assert len(content.nodes) == 1
assert len(scene.nodes) == 1


# Reset the precision to its default value
TOL.precision = 3
5 changes: 5 additions & 0 deletions tests/compas/files/test_stl.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
from compas.files import STL
from compas.tolerance import TOL

# Temporary change the global precision in the TOL class to 12
TOL.precision = 12

BASE_FOLDER = os.path.dirname(__file__)
Expand Down Expand Up @@ -43,3 +44,7 @@ def test_binary_read_write_fidelity():
mesh_2 = Mesh.from_stl(fp)
assert mesh.adjacency == mesh_2.adjacency
assert mesh.vertex == mesh_2.vertex


# Reset the precision to its default value
TOL.precision = 3

0 comments on commit f4fc159

Please sign in to comment.