From aae515cdafd1cd46795dbfd0763193e90f7c3ddd Mon Sep 17 00:00:00 2001 From: Laurent LAPORTE Date: Tue, 14 May 2024 04:10:15 +0200 Subject: [PATCH] test: class `TestSubNode` is renamed `CheckSubNode` to avoid warning during pytest classes collection --- tests/storage/repository/filesystem/test_folder_node.py | 6 +++--- tests/storage/repository/filesystem/utils.py | 5 +++-- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/tests/storage/repository/filesystem/test_folder_node.py b/tests/storage/repository/filesystem/test_folder_node.py index d08360e223..7927927d7e 100644 --- a/tests/storage/repository/filesystem/test_folder_node.py +++ b/tests/storage/repository/filesystem/test_folder_node.py @@ -13,7 +13,7 @@ from antarest.study.storage.rawstudy.model.filesystem.inode import INode from antarest.study.storage.rawstudy.model.filesystem.raw_file_node import RawFileNode from antarest.study.storage.rawstudy.model.filesystem.root.input.areas.list import InputAreasList -from tests.storage.repository.filesystem.utils import TestMiddleNode, TestSubNode +from tests.storage.repository.filesystem.utils import CheckSubNode, TestMiddleNode def build_tree() -> INode[t.Any, t.Any, t.Any]: @@ -24,8 +24,8 @@ def build_tree() -> INode[t.Any, t.Any, t.Any]: context=Mock(), config=config, children={ - "input": TestSubNode(value=100), - "output": TestSubNode(value=200), + "input": CheckSubNode(config, value=100), + "output": CheckSubNode(config, value=200), }, ) diff --git a/tests/storage/repository/filesystem/utils.py b/tests/storage/repository/filesystem/utils.py index 82e0107082..abef9e26e5 100644 --- a/tests/storage/repository/filesystem/utils.py +++ b/tests/storage/repository/filesystem/utils.py @@ -8,7 +8,7 @@ from antarest.study.storage.rawstudy.model.filesystem.inode import TREE, INode -class TestSubNode(INode[int, int, int]): +class CheckSubNode(INode[int, int, int]): def normalize(self) -> None: pass @@ -18,7 +18,8 @@ def denormalize(self) -> None: def build(self, config: FileStudyTreeConfig) -> "TREE": pass - def __init__(self, value: int): + def __init__(self, config: FileStudyTreeConfig, value: int): + super().__init__(config) self.value = value def get_node(