Simplify assertion logic in Runner.py

This commit is contained in:
Thomas Nagy 2017-06-14 14:16:54 +02:00
parent ef75def36a
commit ddce7d344e
1 changed files with 4 additions and 3 deletions

View File

@ -422,9 +422,10 @@ class Parallel(object):
self.get_out()
self.ready.put(None)
assert (self.count == 0 or self.stop)
assert not self.postponed
assert (not self.incomplete or self.stop)
if not self.stop:
assert not self.count
assert not self.postponed
assert not self.incomplete
def prio_and_split(self, tasks):
"""