diff --git a/pyvnt/Container/list.py b/pyvnt/Container/list.py index e4805dd..2c44965 100644 --- a/pyvnt/Container/list.py +++ b/pyvnt/Container/list.py @@ -1,5 +1,5 @@ from pyvnt.Reference.basic import * -from pyvnt.Container.Node_C import Foam +from pyvnt.Container.node import Foam from anytree import Node, RenderTree, AsciiStyle, NodeMixin from pyvnt.Reference.error_classes import SizeError, NoPlaceholdersError, NoValueError, KeyRepeatError from pyvnt.utils.make_indent import make_indent diff --git a/pyvnt/Container/list_backup.py b/pyvnt/Container/list_backup.py index 7c8413a..7ed2b14 100644 --- a/pyvnt/Container/list_backup.py +++ b/pyvnt/Container/list_backup.py @@ -1,5 +1,5 @@ from pyvnt.Reference.basic import * -from pyvnt.Container.Node_C import Foam +from pyvnt.Container.node import Foam from anytree import Node, RenderTree, AsciiStyle, NodeMixin from pyvnt.Reference.error_classes import SizeError, NoPlaceholdersError, NoValueError, KeyRepeatError import warnings diff --git a/pyvnt/Container/node.py b/pyvnt/Container/node.py index 053aa9b..f1560fe 100755 --- a/pyvnt/Container/node.py +++ b/pyvnt/Container/node.py @@ -1,7 +1,7 @@ from anytree import Node, RenderTree, AsciiStyle, NodeMixin from anytree.search import find_by_attr from typing import Any, Type -from pyvnt.Container.Key_C import Key_C +from pyvnt.Container.key import Key_C from pyvnt.Reference.error_classes import * from pyvnt.utils.make_indent import make_indent diff --git a/pyvnt/Container/obj_constructor.py b/pyvnt/Container/obj_constructor.py index 37791ab..7d045f8 100755 --- a/pyvnt/Container/obj_constructor.py +++ b/pyvnt/Container/obj_constructor.py @@ -1,5 +1,5 @@ -from pyvnt.Container.Node_C import Foam -from pyvnt.Container.Key_C import Key_C +from pyvnt.Container.node import Foam +from pyvnt.Container.key import Key_C # Function no longer needed # It is not available to use outside the package and the code is here just for future reference if needed diff --git a/pyvnt/__init__.py b/pyvnt/__init__.py index 9b0b864..e652ef8 100755 --- a/pyvnt/__init__.py +++ b/pyvnt/__init__.py @@ -2,8 +2,8 @@ from pyvnt.Reference.vector import * from pyvnt.Reference.tensor import * from pyvnt.Reference.dimension_set import Dim_Set_P -from pyvnt.Container.Node_C import * -from pyvnt.Container.Key_C import * +from pyvnt.Container.node import * +from pyvnt.Container.key import * from pyvnt.Container.list import * from pyvnt.Converter.Writer.writer import * from pyvnt.utils import * diff --git a/pyvnt/utils/show_tree.py b/pyvnt/utils/show_tree.py index 4c2ddf9..8150d4c 100755 --- a/pyvnt/utils/show_tree.py +++ b/pyvnt/utils/show_tree.py @@ -1,5 +1,5 @@ from anytree import Node, RenderTree, AsciiStyle, NodeMixin -from pyvnt.Container.Node_C import Foam +from pyvnt.Container.node import Foam def show_tree(head: Foam): ''' diff --git a/tests/test_key.py b/tests/test_key.py index 31cdc25..53c1293 100644 --- a/tests/test_key.py +++ b/tests/test_key.py @@ -1,14 +1,15 @@ import pytest -import pyvnt.Container.Key_C as Key_C +from pyvnt.Container.key import Key_C from pyvnt.Reference.basic import * +from pyvnt.Reference.error_classes import * class TestKey_C: def setup_method(self, method): self.items = {'PCG', 'PBiCG', 'PBiCGStab'} self.prop2 = Enm_P('val2', items=self.items, default='PBiCG') self.prop1 = Enm_P('val1', items=self.items, default='PCG') - self.key1 = Key_C.Key_C('solver', self.prop1, self.prop2) + self.key1 = Key_C('solver', self.prop1, self.prop2) def teardown_method(self, method): del self.key1 @@ -42,11 +43,11 @@ def test_Key_C_edit_fail(self): tmp_prop2 = Int_P('tmpval2', 3, 1, 10) tmp_prop3 = Int_P('tmpval2', 4, 1, 10) - with pytest.raises(Key_C.KeyRepeatError): + with pytest.raises(KeyRepeatError): self.key1.replace_val('val1', tmp_prop1) self.key1.replace_val('val2', tmp_prop1) - with pytest.raises(Key_C.KeyRepeatError): + with pytest.raises(KeyRepeatError): self.key1.replace_val('val2', tmp_prop2) self.key1.replace_val('val2', tmp_prop3)