def test_add_remove_node(self): node = MockNode() sched = LoadScheduling(1) sched.addnode(node) collection = ["test_file.py::test_func"] sched.addnode_collection(node, collection) assert sched.collection_is_completed sched.init_distribute() assert not sched.pending crashitem = sched.remove_node(node) assert crashitem == collection[0]
def test_add_remove_node(self): node = MockNode() sched = LoadScheduling(1) sched.addnode(node) collection = ["test_file.py::test_func"] sched.addnode_collection(node, collection) assert sched.collection_is_completed sched.init_distribute() assert not sched.pending crashitem = sched.remove_node(node) assert crashitem == collection[0]
def test_add_remove_node(self, testdir): node = MockNode() config = testdir.parseconfig("--tx=popen") sched = LoadScheduling(config) sched.add_node(node) collection = ["test_file.py::test_func"] sched.add_node_collection(node, collection) assert sched.collection_is_completed sched.schedule() assert not sched.pending crashitem = sched.remove_node(node) assert crashitem == collection[0]