Пример #1
0
 def test_get_initial_tasks_invalid(self):
     with pytest.raises(AssertionError) as excinfo:
         run.get_initial_tasks(True, {
             "targets": "can't be here",
             "roles": "roles"
         }, "machine_type")
     assert excinfo.value.message.startswith("You cannot")
Пример #2
0
 def test_get_inital_tasks(self):
     config = {"roles": range(2), "kernel": "the_kernel", "use_existing_cluster": False}
     result = run.get_initial_tasks(True, config, "machine_type")
     assert {"internal.lock_machines": (2, "machine_type")} in result
     assert {"kernel": "the_kernel"} in result
     # added because use_existing_cluster == False
     assert {'internal.vm_setup': None} in result
Пример #3
0
 def test_get_initial_tasks_invalid(self):
     with pytest.raises(AssertionError):
         run.get_initial_tasks(True, {"targets": "can't be here"}, "machine_type")
Пример #4
0
 def test_get_initial_tasks_invalid(self):
     with pytest.raises(AssertionError) as excinfo:
         run.get_initial_tasks(True, {"targets": "can't be here"}, "machine_type")
     assert excinfo.value.message.startswith("You cannot")