Rename init_distribute() to more clear schedule()
This commit is contained in:
@@ -64,7 +64,7 @@ class TestEachScheduling:
|
||||
assert sched.collection_is_completed
|
||||
assert sched.node2collection[node1] == collection
|
||||
assert sched.node2collection[node2] == collection
|
||||
sched.init_distribute()
|
||||
sched.schedule()
|
||||
assert sched.tests_finished()
|
||||
assert node1.sent == ['ALL']
|
||||
assert node2.sent == ['ALL']
|
||||
@@ -83,7 +83,7 @@ class TestEachScheduling:
|
||||
sched.addnode_collection(node1, collection)
|
||||
assert sched.collection_is_completed
|
||||
assert sched.node2collection[node1] == collection
|
||||
sched.init_distribute()
|
||||
sched.schedule()
|
||||
assert sched.tests_finished()
|
||||
crashitem = sched.remove_node(node1)
|
||||
assert crashitem
|
||||
@@ -106,7 +106,7 @@ class TestLoadScheduling:
|
||||
assert sched.collection_is_completed
|
||||
assert sched.node2collection[node1] == collection
|
||||
assert sched.node2collection[node2] == collection
|
||||
sched.init_distribute()
|
||||
sched.schedule()
|
||||
assert not sched.pending
|
||||
assert sched.tests_finished()
|
||||
assert len(node1.sent) == 1
|
||||
@@ -116,7 +116,7 @@ class TestLoadScheduling:
|
||||
sched.remove_item(node1, node1.sent[0])
|
||||
assert sched.tests_finished()
|
||||
|
||||
def test_init_distribute_batch_size(self, testdir):
|
||||
def test_schedule_batch_size(self, testdir):
|
||||
config = testdir.parseconfig()
|
||||
sched = LoadScheduling(2, config)
|
||||
sched.addnode(MockNode())
|
||||
@@ -125,7 +125,7 @@ class TestLoadScheduling:
|
||||
col = ["xyz"] * (6)
|
||||
sched.addnode_collection(node1, col)
|
||||
sched.addnode_collection(node2, col)
|
||||
sched.init_distribute()
|
||||
sched.schedule()
|
||||
# assert not sched.tests_finished()
|
||||
sent1 = node1.sent
|
||||
sent2 = node2.sent
|
||||
@@ -143,7 +143,7 @@ class TestLoadScheduling:
|
||||
assert node1.sent == [0, 2, 4, 5]
|
||||
assert not sched.pending
|
||||
|
||||
def test_init_distribute_fewer_tests_than_nodes(self, testdir):
|
||||
def test_schedule_fewer_tests_than_nodes(self, testdir):
|
||||
config = testdir.parseconfig()
|
||||
sched = LoadScheduling(2, config)
|
||||
sched.addnode(MockNode())
|
||||
@@ -153,7 +153,7 @@ class TestLoadScheduling:
|
||||
col = ["xyz"] * 2
|
||||
sched.addnode_collection(node1, col)
|
||||
sched.addnode_collection(node2, col)
|
||||
sched.init_distribute()
|
||||
sched.schedule()
|
||||
# assert not sched.tests_finished()
|
||||
sent1 = node1.sent
|
||||
sent2 = node2.sent
|
||||
@@ -163,7 +163,7 @@ class TestLoadScheduling:
|
||||
assert sent3 == []
|
||||
assert not sched.pending
|
||||
|
||||
def test_init_distribute_fewer_than_two_tests_per_node(self, testdir):
|
||||
def test_schedule_fewer_than_two_tests_per_node(self, testdir):
|
||||
config = testdir.parseconfig()
|
||||
sched = LoadScheduling(2, config)
|
||||
sched.addnode(MockNode())
|
||||
@@ -173,7 +173,7 @@ class TestLoadScheduling:
|
||||
col = ["xyz"] * 5
|
||||
sched.addnode_collection(node1, col)
|
||||
sched.addnode_collection(node2, col)
|
||||
sched.init_distribute()
|
||||
sched.schedule()
|
||||
# assert not sched.tests_finished()
|
||||
sent1 = node1.sent
|
||||
sent2 = node2.sent
|
||||
@@ -191,7 +191,7 @@ class TestLoadScheduling:
|
||||
collection = ["test_file.py::test_func"]
|
||||
sched.addnode_collection(node, collection)
|
||||
assert sched.collection_is_completed
|
||||
sched.init_distribute()
|
||||
sched.schedule()
|
||||
assert not sched.pending
|
||||
crashitem = sched.remove_node(node)
|
||||
assert crashitem == collection[0]
|
||||
@@ -223,7 +223,7 @@ class TestLoadScheduling:
|
||||
sched.addnode(node2)
|
||||
sched.addnode_collection(node1, ["a.py::test_1"])
|
||||
sched.addnode_collection(node2, ["a.py::test_2"])
|
||||
sched.init_distribute()
|
||||
sched.schedule()
|
||||
assert len(collect_hook.reports) == 1
|
||||
rep = collect_hook.reports[0]
|
||||
assert 'Different tests were collected between' in rep.longrepr
|
||||
|
||||
Reference in New Issue
Block a user