Skip to content

Commit 5d5d0a0

Browse files
committed
fix tests for ironpython
1 parent 004c1d8 commit 5d5d0a0

File tree

1 file changed

+7
-10
lines changed

1 file changed

+7
-10
lines changed

tests/compas/datastructures/test_mesh.py

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import os
21
import tempfile
32

43
import pytest
@@ -168,15 +167,13 @@ def test_from_ploygons():
168167
# --------------------------------------------------------------------------
169168

170169
def 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

182179
def test_to_vertices_and_faces():

0 commit comments

Comments
 (0)