Skip to content

Commit

Permalink
put test_self_test to the right place.
Browse files Browse the repository at this point in the history
Signed-off-by: Zhen Wang <zhen.wang@alliander.com>
  • Loading branch information
zhen0427 committed Jul 15, 2024
1 parent 24e3a62 commit 6eaa576
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 1 addition & 5 deletions tests/unit/deprecated/test_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
import pytest

from power_grid_model.data_types import Dataset
from power_grid_model.utils import export_json_data, self_test
from power_grid_model.utils import export_json_data


@patch("builtins.open", new_callable=mock_open)
Expand Down Expand Up @@ -37,7 +37,3 @@ def test_export_json_data__deprecated_format(convert_mock: MagicMock, open_mock:
convert_mock.assert_called_once_with(data={}, use_compact_list=False, indent=2)
handle = open_mock()
handle.write.assert_called_once_with('{"foo": [{"val": 123}]}')


def test_self_test():
self_test()
6 changes: 5 additions & 1 deletion tests/unit/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
PowerGridError,
PowerGridSerializationError,
)
from power_grid_model.utils import json_deserialize, json_deserialize_from_file, json_serialize_to_file
from power_grid_model.utils import json_deserialize, json_deserialize_from_file, json_serialize_to_file, self_test

BASE_PATH = Path(__file__).parent.parent
DATA_PATH = BASE_PATH / "data"
Expand Down Expand Up @@ -307,3 +307,7 @@ def convert_python_to_numpy(data: PythonDataset, data_type: DatasetType) -> Data
}
)
)


def test_self_test():
self_test()

0 comments on commit 6eaa576

Please sign in to comment.