Skip to content

Commit

Permalink
chore: update tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Krande committed Sep 3, 2024
1 parent 6f6dca4 commit 347ee56
Show file tree
Hide file tree
Showing 2 changed files with 45 additions and 14 deletions.
45 changes: 45 additions & 0 deletions tests/profiling/test_ifc_creation.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
import pytest

import ada


@pytest.mark.benchmark
def test_build_big_ifc_beams():
# create beams and write it to ifc
beams = []
for i in range(0, 100):
bm = ada.Beam(f"bm{i}", (i, 0, 0), (i + 1, 0, 0), "IPE300")
beams.append(bm)
a = ada.Assembly() / beams
a.to_ifc(file_obj_only=True)


@pytest.mark.benchmark
def test_build_big_ifc_plates():
objects = []
points = [(0, 0), (1, 0), (1, 1), (0, 1)]
for i in range(0, 100):
bm = ada.Plate(f"pl{i}", points, 0.01, origin=(0, 0, i))
objects.append(bm)
a = ada.Assembly() / objects
a.to_ifc(file_obj_only=True)


@pytest.mark.benchmark
def test_build_big_ifc_box():
objects = []
for i in range(0, 100):
bm = ada.PrimBox(f"obj{i}", (0, 0, i), (0.5, 0.5, i + 0.5))
objects.append(bm)
a = ada.Assembly() / objects
a.to_ifc(file_obj_only=True)


@pytest.mark.benchmark
def test_build_big_ifc_sphere():
objects = []
for i in range(0, 100):
bm = ada.PrimSphere(f"obj{i}", (0, 0, i), 0.2)
objects.append(bm)
a = ada.Assembly() / objects
a.to_ifc(file_obj_only=True)
14 changes: 0 additions & 14 deletions tests/profiling/test_large_ifc_models.py

This file was deleted.

0 comments on commit 347ee56

Please sign in to comment.