File tree Expand file tree Collapse file tree 2 files changed +2
-18
lines changed Expand file tree Collapse file tree 2 files changed +2
-18
lines changed Original file line number Diff line number Diff line change @@ -191,6 +191,8 @@ def section_type_must_be_defined(sec):
191
191
Validation .register_handler ('section' , section_type_must_be_defined )
192
192
193
193
194
+ # The Section repository present is no longer part of the default validation
195
+ # and should be added on demand.
194
196
def section_repository_present (sec ):
195
197
"""
196
198
1. warn, if a section has no repository or
@@ -214,9 +216,6 @@ def section_repository_present(sec):
214
216
yield ValidationError (sec , msg , LABEL_WARNING )
215
217
216
218
217
- Validation .register_handler ('section' , section_repository_present )
218
-
219
-
220
219
def document_unique_ids (doc ):
221
220
"""
222
221
Traverse an odML Document and check whether all
Original file line number Diff line number Diff line change @@ -195,21 +195,6 @@ def test_section_sections_cardinality(self):
195
195
196
196
self .assertTrue (found )
197
197
198
- def test_section_in_terminology (self ):
199
- doc = samplefile .parse ("""s1[T1]""" )
200
- res = Validate (doc )
201
- self .assertError (res , "A section should have an associated repository" ,
202
- filter_rep = False )
203
-
204
- odml .terminology .terminologies ['map' ] = samplefile .parse ("""
205
- s0[t0]
206
- - S1[T1]
207
- """ )
208
- doc .sections [0 ].repository = 'map'
209
- res = Validate (doc )
210
- # self.assertEqual(list(self.filter_mapping_errors(res.errors)), [])
211
- self .assertEqual (res .errors , [])
212
-
213
198
def test_uniques (self ):
214
199
self .assertRaises (KeyError , samplefile .parse , """
215
200
s1[t1]
You can’t perform that action at this time.
0 commit comments