File tree Expand file tree Collapse file tree 1 file changed +7
-10
lines changed
tests/compas/datastructures Expand file tree Collapse file tree 1 file changed +7
-10
lines changed Original file line number Diff line number Diff line change 1- import os
21import tempfile
32
43import pytest
@@ -168,15 +167,13 @@ def test_from_ploygons():
168167# --------------------------------------------------------------------------
169168
170169def test_to_obj ():
171- with tempfile .TemporaryDirectory () as tempdir :
172- fname = os .path .join (tempdir , 'temp.obj' )
173- mesh = Mesh .from_obj (compas .get ('faces.obj' ))
174- mesh .to_obj (fname )
175- mesh = Mesh .from_obj (fname )
176- assert mesh .number_of_faces () == 25
177- assert mesh .number_of_vertices () == 36
178- assert mesh .number_of_edges () == 60
179- os .remove (fname )
170+ _ , fname = tempfile .mkstemp (suffix = '.obj' , prefix = 'temp_mesh_test' )
171+ mesh = Mesh .from_obj (compas .get ('faces.obj' ))
172+ mesh .to_obj (fname )
173+ mesh = Mesh .from_obj (fname )
174+ assert mesh .number_of_faces () == 25
175+ assert mesh .number_of_vertices () == 36
176+ assert mesh .number_of_edges () == 60
180177
181178
182179def test_to_vertices_and_faces ():
You can’t perform that action at this time.
0 commit comments