From be5950bcb780899aad3f204d968ebc2ec2d7a70f Mon Sep 17 00:00:00 2001 From: Andrej730 Date: Fri, 14 Jul 2023 10:51:01 +0500 Subject: [PATCH] clean up after running test_wall_opening.py --- src/ifcopenshell-python/test/test_wall_opening.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/ifcopenshell-python/test/test_wall_opening.py b/src/ifcopenshell-python/test/test_wall_opening.py index f331297e73..6c9ed4242d 100644 --- a/src/ifcopenshell-python/test/test_wall_opening.py +++ b/src/ifcopenshell-python/test/test_wall_opening.py @@ -64,6 +64,7 @@ X = 1.0, 0.0, 0.0 Y = 0.0, 1.0, 0.0 Z = 0.0, 0.0, 1.0 + # Creates an IfcAxis2Placement3D from Location, Axis and RefDirection specified as Python tuples def create_ifcaxis2placement(f, point=O, dir1=Z, dir2=X): point = f.createIfcCartesianPoint(point) @@ -100,7 +101,6 @@ def create_ifcextrudedareasolid(f, point_list, ifcaxis2placement, extrude_dir, e def create_case(fn, openings): - f = ifcopenshell.template.create() owner_history = f.by_type("IfcOwnerHistory")[0] @@ -127,7 +127,6 @@ def create_case(fn, openings): ) for opening in openings: - opening_placement = create_ifclocalplacement( f, (opening.x, 0.0, opening.z), (0.0, 1.0, 0.0), (1.0, 0.0, 0.0), wall_placement ) @@ -147,7 +146,6 @@ def create_case(fn, openings): class TestWallOpenings: @pytest.mark.skipif(shutil.which("IfcConvert") is None, reason="Requires IfcConvert in path") def test_all(self): - cases = [ ( "wall-openings-non-intersecting-rect-circle.ifc", @@ -205,7 +203,6 @@ class TestWallOpenings: result.append([fn]) for i in range(2 if PERF else 1): - args = [ shutil.which("IfcConvert") or "IfcConvert", "-qyvvv", @@ -236,12 +233,16 @@ class TestWallOpenings: # breakpoint() + temp_files = [fn, f"{fn}.obj", f"{fn}.log.json", f"{fn}.mtl"] + for temp_fn in temp_files: + os.unlink(temp_fn) + try: import tabulate except: return - print(tabulate.tabulate(result, headers=["file", "", "--no-2d-boolean"], tablefmt="github")) + print("\n" + tabulate.tabulate(result, headers=["file", "", "--no-2d-boolean"], tablefmt="github")) if __name__ == "__main__":