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")
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
def test_get_initial_tasks_invalid(self): with pytest.raises(AssertionError): run.get_initial_tasks(True, {"targets": "can't be here"}, "machine_type")
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")