@@ -51,7 +51,8 @@ def save_load(self):
5151 def test_id (self ):
5252 # Test correct save and load of generated id.
5353 sec_name = "empty_id"
54- sec = odml .Section (name = sec_name , parent = self .doc )
54+ sec_type = "type"
55+ sec = odml .Section (name = sec_name , type = sec_type , parent = self .doc )
5556
5657 jdoc , xdoc , ydoc = self .save_load ()
5758
@@ -62,7 +63,7 @@ def test_id(self):
6263 # Test correct save and load of assigned id.
6364 sec_name = "assigned_id"
6465 assigned_id = "79b613eb-a256-46bf-84f6-207df465b8f7"
65- _ = odml .Section (name = sec_name , oid = assigned_id , parent = self .doc )
66+ _ = odml .Section (name = sec_name , oid = assigned_id , type = sec_type , parent = self .doc )
6667
6768 jdoc , xdoc , ydoc = self .save_load ()
6869
@@ -116,31 +117,32 @@ def test_children(self):
116117 This test checks correct writing and loading of Section and Property
117118 children of a Section.
118119 """
119- root = odml .Section (name = "root" , parent = self .doc )
120+ s_type = "type"
121+ root = odml .Section (name = "root" , type = s_type , parent = self .doc )
120122
121123 # Lvl 1 child Sections
122- sec_lvl_11 = odml .Section (name = "sec_11" , parent = root )
123- _ = odml .Section (name = "sec_12" , parent = root )
124+ sec_lvl_11 = odml .Section (name = "sec_11" , type = s_type , parent = root )
125+ _ = odml .Section (name = "sec_12" , type = s_type , parent = root )
124126
125127 # Lvl 1 child Properties
126128 _ = odml .Property (name = "prop_11" , parent = root )
127129 _ = odml .Property (name = "prop_12" , parent = root )
128130
129131 # Lvl 2 child Sections
130- sec_lvl_21 = odml .Section (name = "sec_21" , parent = sec_lvl_11 )
131- _ = odml .Section (name = "sec_22" , parent = sec_lvl_11 )
132- _ = odml .Section (name = "sec_23" , parent = sec_lvl_11 )
132+ sec_lvl_21 = odml .Section (name = "sec_21" , type = s_type , parent = sec_lvl_11 )
133+ _ = odml .Section (name = "sec_22" , type = s_type , parent = sec_lvl_11 )
134+ _ = odml .Section (name = "sec_23" , type = s_type , parent = sec_lvl_11 )
133135
134136 # Lvl 2 child Properties
135137 _ = odml .Property (name = "prop_21" , parent = sec_lvl_11 )
136138 _ = odml .Property (name = "prop_22" , parent = sec_lvl_11 )
137139 _ = odml .Property (name = "prop_23" , parent = sec_lvl_11 )
138140
139141 # Lvl 3 child Sections
140- _ = odml .Section (name = "sec_31" , parent = sec_lvl_21 )
141- _ = odml .Section (name = "sec_32" , parent = sec_lvl_21 )
142- _ = odml .Section (name = "sec_33" , parent = sec_lvl_21 )
143- _ = odml .Section (name = "sec_34" , parent = sec_lvl_21 )
142+ _ = odml .Section (name = "sec_31" , type = s_type , parent = sec_lvl_21 )
143+ _ = odml .Section (name = "sec_32" , type = s_type , parent = sec_lvl_21 )
144+ _ = odml .Section (name = "sec_33" , type = s_type , parent = sec_lvl_21 )
145+ _ = odml .Section (name = "sec_34" , type = s_type , parent = sec_lvl_21 )
144146
145147 # Lvl 3 child Properties
146148 _ = odml .Property (name = "prop_31" , parent = sec_lvl_21 )
0 commit comments