示例#1
0
 def build_actions(self):
     self.test_dir = tempfile.mkdtemp()
     self.action = action.Action("Test Action")
     self.job = job.Job("Test Job", self.action)
     self.job.output_dir = self.test_dir
     self.mcp = mcp.MasterControlProgram(self.test_dir, "config")
     self.job.node_pool = node.NodePool('test hostname')
示例#2
0
 def build_job(self):
     self.test_dir = tempfile.mkdtemp()
     self.action = action.Action(name="Test Action")
     self.action.command = "Test Action Command"
     self.job = job.Job("Test Job", self.action)
     self.job.node_pool = node.NodePool("host")
     self.job.output_dir = self.test_dir
     self.action.job = self.job
     self.job.scheduler = scheduler.ConstantScheduler()
示例#3
0
文件: node_test.py 项目: kesre/Tron
 def test__eq__(self):
     other_pool = node.NodePool(self.nodes, 'othername')
     assert_equal(self.node_pool, other_pool)
示例#4
0
文件: node_test.py 项目: kesre/Tron
 def test__init__(self):
     new_node = node.NodePool(self.nodes, 'thename')
     assert_equal(new_node.name, 'thename')
示例#5
0
文件: node_test.py 项目: kesre/Tron
 def setup_nodes(self):
     self.nodes = [build_node(name='node%s' % i) for i in xrange(5)]
     self.node_pool = node.NodePool(self.nodes, 'thename')