Skip to content

Commit

Permalink
#187 Update tests
Browse files Browse the repository at this point in the history
  • Loading branch information
alexhad6 committed Jun 13, 2024
1 parent 7b4de7b commit ff884bd
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 61 deletions.
11 changes: 0 additions & 11 deletions tests/_param_data/test_param_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,17 +81,6 @@ def test_param_data_updating_child_updates_last_updated(
assert times.start < param_data.last_updated.timestamp() < times.end


def test_param_data__updates_last_updated(
param_data: ParamData[Any], param_data_child_name: str | int | None
) -> None:
"""The last updated time is updated when a child is updated."""
if param_data_child_name is None:
return
with capture_start_end_times() as times:
update_child(param_data, param_data_child_name)
assert times.start < param_data.last_updated.timestamp() < times.end


def test_child_does_not_change(param_data: ParamData[Any]) -> None:
"""
Including a parameter data object as a child within a parent structure does not
Expand Down
50 changes: 0 additions & 50 deletions tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -225,53 +225,3 @@ def fixture_param_data_child_name(param_data: ParamData[Any]) -> str | int | Non
if isinstance(param_data, ParamDict):
return None if len(param_data) == 0 else "simple_param"
return None


# @pytest.fixture(name="updated_param_data_and_times")
# def fixture_updated_param_data_and_times(
# param_data: ParamData[Any], number: float
# ) -> tuple[ParamData[Any], Times]:
# """
# Parameter data that has been updated between the returned Times. Broken down into
# individual fixtures for parameter data and times below.
# """
# updated_param_data = deepcopy(param_data)
# with capture_start_end_times() as times:
# if isinstance(updated_param_data, EmptyParam):
# updated_param_data = type(updated_param_data)()
# elif isinstance(updated_param_data, ParamDataFrame):
# updated_param_data.path = ""
# elif isinstance(updated_param_data, SimpleParam):
# updated_param_data.number += 1
# elif isinstance(updated_param_data, SubclassParam):
# updated_param_data.second_number += 1
# elif isinstance(updated_param_data, ComplexParam):
# assert updated_param_data.simple_param is not None
# updated_param_data.simple_param.number += 1
# elif isinstance(updated_param_data, ParamList):
# if len(updated_param_data) == 0:
# updated_param_data.append(number)
# else:
# updated_param_data[4].number += 1
# elif isinstance(updated_param_data, ParamDict):
# if len(updated_param_data) == 0:
# updated_param_data["number"] = number
# else:
# updated_param_data.simple_param.number += 1
# return updated_param_data, times


# @pytest.fixture(name="updated_param_data")
# def fixture_updated_param_data(
# updated_param_data_and_times: tuple[ParamData[Any], Times]
# ) -> ParamData[Any]:
# """Parameter data that has been updated."""
# return updated_param_data_and_times[0]


# @pytest.fixture(name="updated_times")
# def fixture_updated_times(
# updated_param_data_and_times: tuple[ParamData[Any], Times]
# ) -> Times:
# """Times before and after param_data fixture was updated."""
# return updated_param_data_and_times[1]

0 comments on commit ff884bd

Please sign in to comment.