示例#1
0
 def _term_regex():
     assert isinstance(self.term_regex, (compat.basestring, tuple))
     if isinstance(self.term_regex, compat.basestring):
         assert_string(self.term_regex)
     else:
         assert_iterable(self.term_regex, compat.basestring, tuple)
         assert len(self.term_regex) > 1
         assert self.term_regex[0].count('{}') == (len(self.term_regex) - 1)
         for identifier in self.term_regex[1:]:
             assert_namespace(identifier, min_length=3, max_length=4)
示例#2
0
 def _terms():
     assert_iterable(self.terms, Term)
示例#3
0
 def _collections():
     assert_iterable(self.collections, Collection)
示例#4
0
 def _alternative_names():
     assert_iterable(self.alternative_names, assert_string)
示例#5
0
 def _scopes():
     assert_iterable(self.scopes, Scope)