Indent code in test.py properly
This commit is contained in:
parent
48c15b70db
commit
d0c4854c2d
40
test/test.py
40
test/test.py
@ -351,28 +351,28 @@ class PDFTestHandler(TestHandlerBase):
|
|||||||
}
|
}
|
||||||
State.stats.append(stat)
|
State.stats.append(stat)
|
||||||
|
|
||||||
def isTaskDone():
|
def isTaskDone():
|
||||||
last_page_num = result['lastPageNum']
|
last_page_num = result['lastPageNum']
|
||||||
rounds = State.manifest[id]['rounds']
|
rounds = State.manifest[id]['rounds']
|
||||||
for round in range(0,rounds):
|
for round in range(0,rounds):
|
||||||
if not taskResults[round]:
|
if not taskResults[round]:
|
||||||
return False
|
return False
|
||||||
latest_page = taskResults[round][-1]
|
latest_page = taskResults[round][-1]
|
||||||
if not latest_page.page == last_page_num:
|
if not latest_page.page == last_page_num:
|
||||||
return False
|
return False
|
||||||
return True
|
return True
|
||||||
|
|
||||||
if isTaskDone():
|
if isTaskDone():
|
||||||
# sort the results since they sometimes come in out of order
|
# sort the results since they sometimes come in out of order
|
||||||
for results in taskResults:
|
for results in taskResults:
|
||||||
results.sort(key=lambda result: result.page)
|
results.sort(key=lambda result: result.page)
|
||||||
check(State.manifest[id], taskResults, browser,
|
check(State.manifest[id], taskResults, browser,
|
||||||
self.server.masterMode)
|
self.server.masterMode)
|
||||||
# Please oh please GC this ...
|
# Please oh please GC this ...
|
||||||
del State.taskResults[browser][id]
|
del State.taskResults[browser][id]
|
||||||
State.remaining[browser] -= 1
|
State.remaining[browser] -= 1
|
||||||
|
|
||||||
checkIfDone()
|
checkIfDone()
|
||||||
|
|
||||||
def checkIfDone():
|
def checkIfDone():
|
||||||
State.done = True
|
State.done = True
|
||||||
|
Loading…
x
Reference in New Issue
Block a user