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
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']
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'})
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'} )
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
def setup(self): self.c = Collection.from_module(load('integration'))
def setup(self): self.c = Collection.from_module(load('explicit_root'))
def honors_subcollection_task_aliases(self): self.c.add_collection(load('decorator')) assert 'decorator.bar' in self.c
def can_take_module_objects(self): self.c.add_collection(load('integration')) assert 'integration' in self.c.collections
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'
def setup(self): self.mod = load('integration') self.fm = Collection.from_module