コード例 #1
0
ファイル: collection.py プロジェクト: B-Rich/invoke
 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
ファイル: collection.py プロジェクト: vhbit/invoke
 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
ファイル: collection.py プロジェクト: techniq/invoke
 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
ファイル: collection.py プロジェクト: vhbit/invoke
 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
ファイル: collection.py プロジェクト: B-Rich/invoke
 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
ファイル: collection.py プロジェクト: techniq/invoke
 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
ファイル: collection.py プロジェクト: techniq/invoke
 def setup(self):
     self.c = Collection.from_module(load('integration'))
コード例 #8
0
ファイル: collection.py プロジェクト: techniq/invoke
 def setup(self):
     self.c = Collection.from_module(load('explicit_root'))
コード例 #9
0
ファイル: collection.py プロジェクト: techniq/invoke
 def honors_subcollection_task_aliases(self):
     self.c.add_collection(load('decorator'))
     assert 'decorator.bar' in self.c
コード例 #10
0
ファイル: collection.py プロジェクト: techniq/invoke
 def can_take_module_objects(self):
     self.c.add_collection(load('integration'))
     assert 'integration' in self.c.collections
コード例 #11
0
ファイル: collection.py プロジェクト: vhbit/invoke
 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
ファイル: collection.py プロジェクト: vhbit/invoke
 def setup(self):
     self.mod = load('integration')
     self.fm = Collection.from_module
コード例 #13
0
ファイル: collection.py プロジェクト: B-Rich/invoke
 def setup(self):
     self.mod = load('integration')
     self.fm = Collection.from_module
コード例 #14
0
ファイル: collection.py プロジェクト: B-Rich/invoke
 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'