Permalink
Browse files

Remove uncovered code - they never happen

  • Loading branch information...
shane-breeze committed Oct 28, 2018
1 parent 4681d2d commit a2d3afc29a1f14cc5a26531927646b8b20476fee
@@ -129,10 +129,6 @@ def _collect_all_finished_pkgidx_result_pairs(self):
return pkgidx_result_pairs
def _collect_next_finished_pkgidx_result_pair(self):
# No runs remaining
if not self.runid_pkgidx_map:
return None
if not self.runid_to_return:
self.runid_to_return.extend(self.dispatcher.poll())
@@ -141,10 +141,7 @@ def test_receive_one(obj, pkgidx_result_pairs):
with mock.patch('time.sleep') as sleep:
actual = [ ]
while len(actual) < len(pkgidx_result_pairs):
pair = obj.receive_one()
if pair is None:
break
actual.append(pair)
actual.append(obj.receive_one())
assert obj.receive_one() is None
assert sorted(pkgidx_result_pairs) == sorted(actual)
assert [mock.call(0.01)]*4 == sleep.call_args_list
@@ -176,10 +173,7 @@ def test_receive_one_param(obj, pkgidx_result_pairs, dispatcher, dispatcher_poll
actual = [ ]
while len(actual) < len(pkgidx_result_pairs):
pair = obj.receive_one()
if pair is None:
break
actual.append(pair)
actual.append(obj.receive_one())
assert obj.receive_one() is None
assert sorted(pkgidx_result_pairs) == sorted(actual)
assert [mock.call(0.01)]*(len(dispatcher_poll)-1) == sleep.call_args_list

0 comments on commit a2d3afc

Please sign in to comment.