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