예제 #1
0
 def searches_towards_root_of_filesystem(self):
     # Loaded while root is in same dir as .py
     directly = self.l.load('foo')
     # Loaded while root is multiple dirs deeper than the .py
     deep = os.path.join(support, 'ignoreme', 'ignoremetoo')
     indirectly = FSLoader(start=deep).load('foo')
     eq_(directly, indirectly)
예제 #2
0
 def searches_towards_root_of_filesystem(self):
     # Loaded while root is in same dir as .py
     directly = self.l.load("foo")
     # Loaded while root is multiple dirs deeper than the .py
     deep = os.path.join(support, "ignoreme", "ignoremetoo")
     indirectly = FSLoader(start=deep).load("foo")
     assert directly == indirectly
예제 #3
0
 def start_point_is_configurable_via_config(self):
     config = Config({"tasks": {"search_root": "nowhere"}})
     assert FSLoader(config=config).start == "nowhere"
예제 #4
0
 def start_point_is_configurable_via_kwarg(self):
     start = "/tmp/"
     assert FSLoader(start=start).start == start
예제 #5
0
 def exposes_start_point_as_attribute(self):
     assert FSLoader().start == os.getcwd()
예제 #6
0
 def discovery_start_point_defaults_to_cwd(self):
     assert FSLoader().start == os.getcwd()
예제 #7
0
 def setup(self):
     self.l = FSLoader(start=support)
예제 #8
0
 def defaults_to_tasks_collection(self):
     "defaults to 'tasks' collection"
     result = FSLoader(start=support + '/implicit/').load()
     eq_(type(result), Collection)
예제 #9
0
 def has_a_default_discovery_start_point(self):
     eq_(FSLoader().start, os.getcwd())
예제 #10
0
 def exposes_discovery_start_point(self):
     start = '/tmp/'
     eq_(FSLoader(start=start).start, start)
예제 #11
0
 def start_point_is_configurable_via_config(self):
     config = Config({'tasks': {'search_root': 'nowhere'}})
     assert FSLoader(config=config).start == 'nowhere'
예제 #12
0
파일: loader.py 프로젝트: lfany/invoke
 def start_point_is_configurable_via_kwarg(self):
     start = '/tmp/'
     eq_(FSLoader(start=start).start, start)
예제 #13
0
파일: loader.py 프로젝트: lfany/invoke
 def exposes_start_point_as_attribute(self):
     eq_(FSLoader().start, os.getcwd())
예제 #14
0
파일: loader.py 프로젝트: lfany/invoke
 def discovery_start_point_defaults_to_cwd(self):
     eq_(FSLoader().start, os.getcwd())