File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -191,6 +191,8 @@ def section_type_must_be_defined(sec):
191191Validation .register_handler ('section' , section_type_must_be_defined )
192192
193193
194+ # The Section repository present is no longer part of the default validation
195+ # and should be added on demand.
194196def section_repository_present (sec ):
195197 """
196198 1. warn, if a section has no repository or
@@ -214,9 +216,6 @@ def section_repository_present(sec):
214216 yield ValidationError (sec , msg , LABEL_WARNING )
215217
216218
217- Validation .register_handler ('section' , section_repository_present )
218-
219-
220219def document_unique_ids (doc ):
221220 """
222221 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):
195195
196196 self .assertTrue (found )
197197
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-
213198 def test_uniques (self ):
214199 self .assertRaises (KeyError , samplefile .parse , """
215200 s1[t1]
You can’t perform that action at this time.
0 commit comments