MCPcopy Create free account
hub / github.com/IfcOpenShell/IfcOpenShell / test_render_with_view

Method test_render_with_view

src/ifcquery/tests/test_render.py:338–355  ·  view source on GitHub ↗
(self, model_with_geometry)

Source from the content-addressed store, hash-verified

336 pass
337
338 def test_render_with_view(self, model_with_geometry):
339 ifc_path = self._ifc_path(model_with_geometry)
340 out_path = ifc_path.replace(".ifc", "_top.png")
341 try:
342 result = subprocess.run(
343 [sys.executable, "-m", "ifcquery", ifc_path, "render", "-o", out_path, "--view", "top"],
344 capture_output=True,
345 text=True,
346 )
347 assert result.returncode == 0, result.stderr
348 with open(out_path, "rb") as f:
349 assert f.read(4) == PNG_MAGIC
350 finally:
351 for path in (ifc_path, out_path):
352 try:
353 os.unlink(path)
354 except OSError:
355 pass

Callers

nothing calls this directly

Calls 5

_ifc_pathMethod · 0.95
openFunction · 0.50
runMethod · 0.45
readMethod · 0.45
unlinkMethod · 0.45

Tested by

no test coverage detected