@@ -51,7 +51,8 @@ def save_load(self):
51
51
def test_id (self ):
52
52
# Test correct save and load of generated id.
53
53
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 )
55
56
56
57
jdoc , xdoc , ydoc = self .save_load ()
57
58
@@ -62,7 +63,7 @@ def test_id(self):
62
63
# Test correct save and load of assigned id.
63
64
sec_name = "assigned_id"
64
65
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 )
66
67
67
68
jdoc , xdoc , ydoc = self .save_load ()
68
69
@@ -116,31 +117,32 @@ def test_children(self):
116
117
This test checks correct writing and loading of Section and Property
117
118
children of a Section.
118
119
"""
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 )
120
122
121
123
# 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 )
124
126
125
127
# Lvl 1 child Properties
126
128
_ = odml .Property (name = "prop_11" , parent = root )
127
129
_ = odml .Property (name = "prop_12" , parent = root )
128
130
129
131
# 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 )
133
135
134
136
# Lvl 2 child Properties
135
137
_ = odml .Property (name = "prop_21" , parent = sec_lvl_11 )
136
138
_ = odml .Property (name = "prop_22" , parent = sec_lvl_11 )
137
139
_ = odml .Property (name = "prop_23" , parent = sec_lvl_11 )
138
140
139
141
# 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 )
144
146
145
147
# Lvl 3 child Properties
146
148
_ = odml .Property (name = "prop_31" , parent = sec_lvl_21 )
0 commit comments