Commit 264219a8 authored by dboe's avatar dboe
Browse files

discovered mesh loading does not work with obj

parent a4cc513e
from tempfile import NamedTemporaryFile
import tfields
import numpy as np
import unittest
......@@ -22,6 +23,14 @@ class Mesh3D_Check(TensorMaps_Check):
# that is ok because self._inst could have stale indices etc..
self.assertTrue(tri.equal(tri_2))
def test_save_obj(self):
out_file = NamedTemporaryFile(suffix='.obj')
self._inst.save(out_file.name)
_ = out_file.seek(0) # this is only necessary in the test
load_inst = type(self._inst).load(out_file.name)
print(self._inst, load_inst)
self.demand_equal(load_inst)
class Square_Test(Mesh3D_Check, unittest.TestCase):
def setUp(self):
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment