:param tmpdir: temporary directory fixture :param box123: box fixture :param id: The index or id; output filename is _ .stl :param opt: The export opt dict :param matchval: Check that the file starts with the specified value
(tmpdir, box123, id, opt, matchval)
| 802 | ], |
| 803 | ) |
| 804 | def test_stl_binary(tmpdir, box123, id, opt, matchval): |
| 805 | """ |
| 806 | :param tmpdir: temporary directory fixture |
| 807 | :param box123: box fixture |
| 808 | :param id: The index or id; output filename is <test name>_<id>.stl |
| 809 | :param opt: The export opt dict |
| 810 | :param matchval: Check that the file starts with the specified value |
| 811 | """ |
| 812 | |
| 813 | fpath = tmpdir.joinpath(f"stl_binary_{id}.stl").resolve() |
| 814 | assert not fpath.exists() |
| 815 | |
| 816 | assert matchval |
| 817 | |
| 818 | exporters.export(box123, str(fpath), None, 0.1, 0.1, opt) |
| 819 | |
| 820 | with open(fpath, "rb") as f: |
| 821 | r = f.read(len(matchval)) |
| 822 | assert r == matchval |
| 823 | |
| 824 | |
| 825 | def test_assy_vtk_rotation(tmpdir): |