def test_export(self): obj = CubeStack() f = lambda n: os.path.join(self.foldername, n) obj.exporter('json')(f('out.json')) self.assertFalse(os.path.exists(f('out.json'))) self.assertFilesizeNonZero(f('out.cube_a.json')) self.assertFilesizeNonZero(f('out.cube_b.json'))
def test_assembly(self): asm = CubeStack() asm.exporter('gltf')(os.path.join(self.foldername, 'asm.gltf')) self.assertFilesizeNonZero(os.path.join(self.foldername, 'asm.gltf')) for name in asm.components.keys( ): # only works because it's a single layer assembly self.assertFilesizeNonZero( os.path.join(self.foldername, 'asm.%s.bin' % name))