Skip to content

Commit

Permalink
test: Add get_cpt_depth test
Browse files Browse the repository at this point in the history
  • Loading branch information
Thijs Lukkezen authored and tlukkezen committed Nov 20, 2024
1 parent c1905c2 commit 733dd28
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions tests/input/test_multi_cpt.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import numpy as np
import pygef
import pytest
from nuclei.client.utils import serialize_jsonifyable_object
from openapi_core.contrib.requests import RequestsOpenAPIRequest
Expand All @@ -11,6 +13,7 @@
)
from pypilecore.common.piles.type import PileType
from pypilecore.input.multi_cpt import create_multi_cpt_payload
from pypilecore.input.soil_properties import get_cpt_depth


@pytest.fixture()
Expand Down Expand Up @@ -215,3 +218,13 @@ def test_create_multi_cpt_payload_excavation_settings_invalid(
groundwater_level_nap=-10.0,
pile=round_pile,
)


def test_get_cpt_depth(cpt: pygef.cpt.CPTData):
depth = np.array(cpt.data["depth"])
penetration_length = np.array(cpt.data["penetrationLength"])

assert np.array_equal(get_cpt_depth(cpt), depth)

cpt.data.drop_in_place("depth")
assert np.array_equal(get_cpt_depth(cpt), penetration_length)

0 comments on commit 733dd28

Please sign in to comment.