示例#1
0
 def returns_unique_Collection_objects_for_same_input_module(self):
     # Ignoring self.c for now, just in case it changes later.
     # First, a module with no root NS
     mod = load('integration')
     c1 = Collection.from_module(mod)
     c2 = Collection.from_module(mod)
     assert c1 is not c2
     # Now one *with* a root NS (which was previously buggy)
     mod2 = load('explicit_root')
     c3 = Collection.from_module(mod2)
     c4 = Collection.from_module(mod2)
     assert c3 is not c4
示例#2
0
 def returns_unique_Collection_objects_for_same_input_module(self):
     # Ignoring self.c for now, just in case it changes later.
     # First, a module with no root NS
     mod = load('integration')
     c1 = Collection.from_module(mod)
     c2 = Collection.from_module(mod)
     assert c1 is not c2
     # Now one *with* a root NS (which was previously buggy)
     mod2 = load('explicit_root')
     c3 = Collection.from_module(mod2)
     c4 = Collection.from_module(mod2)
     assert c3 is not c4
示例#3
0
 def honors_subcollection_default_tasks_on_subcollection_name(self):
     sub = Collection.from_module(load('decorator'))
     self.c.add_collection(sub)
     # Sanity
     assert self.c['decorator.biz'] is sub['biz']
     # Real test
     assert self.c['decorator'] is self.c['decorator.biz']
示例#4
0
 def setup(self):
     mod = load('explicit_root')
     mod.ns.configure({'key': 'builtin', 'otherkey': 'yup'})
     mod.ns.name = 'builtin_name'
     self.unchanged = Collection.from_module(mod)
     self.changed = Collection.from_module(
         mod, name='override_name', config={'key': 'override'})
示例#5
0
 def setup(self):
     mod = load('explicit_root')
     mod.ns.configure({'key': 'builtin', 'otherkey': 'yup'})
     mod.ns.name = 'builtin_name'
     self.unchanged = Collection.from_module(mod)
     self.changed = Collection.from_module(
         mod,
         name='override_name',
         config={'key': 'override'}
     )
示例#6
0
 def honors_explicit_collections(self):
     coll = Collection.from_module(load('explicit_root'))
     assert 'top_level' in coll.tasks
     assert 'sub' in coll.collections
     # The real key test
     assert 'sub_task' not in coll.tasks
示例#7
0
 def setup(self):
     self.c = Collection.from_module(load('integration'))
示例#8
0
 def setup(self):
     self.c = Collection.from_module(load('explicit_root'))
示例#9
0
 def honors_subcollection_task_aliases(self):
     self.c.add_collection(load('decorator'))
     assert 'decorator.bar' in self.c
示例#10
0
 def can_take_module_objects(self):
     self.c.add_collection(load('integration'))
     assert 'integration' in self.c.collections
示例#11
0
 def allows_tasks_with_explicit_names_to_override_bound_name(self):
     coll = Collection.from_module(load('subcollection_task_name'))
     assert 'explicit_name' in coll.tasks  # not 'implicit_name'
示例#12
0
 def setup(self):
     self.mod = load('integration')
     self.fm = Collection.from_module
示例#13
0
 def setup(self):
     self.mod = load('integration')
     self.fm = Collection.from_module
示例#14
0
 def allows_tasks_with_explicit_names_to_override_bound_name(self):
     coll = Collection.from_module(load('subcollection_task_name'))
     assert 'explicit_name' in coll.tasks # not 'implicit_name'