Update TestSuite.py
This commit is contained in:
34
TestSuite.py
34
TestSuite.py
@@ -25,10 +25,10 @@ def main(args=None):
|
|||||||
|
|
||||||
def test(testname: str, command: str):
|
def test(testname: str, command: str):
|
||||||
tests[testname] = [command]
|
tests[testname] = [command]
|
||||||
# testmodes = [['Open', ''],
|
testmodes = [['Open', ''],
|
||||||
# ['Std ', ' --mode standard'],
|
['Std ', ' --mode standard'],
|
||||||
# ['Inv ', ' --mode inverted']]
|
['Inv ', ' --mode inverted']]
|
||||||
testmodes = [['Open', '']]
|
# testmodes = [['Open', '']]
|
||||||
for mode in testmodes:
|
for mode in testmodes:
|
||||||
|
|
||||||
basecommand = f"py -3.8 DungeonRandomizer.py --door_shuffle {args.dr} --intensity {args.tense} --suppress_rom --suppress_spoiler"
|
basecommand = f"py -3.8 DungeonRandomizer.py --door_shuffle {args.dr} --intensity {args.tense} --suppress_rom --suppress_spoiler"
|
||||||
@@ -46,13 +46,13 @@ def main(args=None):
|
|||||||
task_mapping.append(task)
|
task_mapping.append(task)
|
||||||
|
|
||||||
test("Vanilla ", "--shuffle vanilla")
|
test("Vanilla ", "--shuffle vanilla")
|
||||||
# test("Retro ", "--retro --shuffle vanilla")
|
test("Retro ", "--retro --shuffle vanilla")
|
||||||
# test("Futuro ", "--futuro --shuffle vanilla")
|
test("Futuro ", "--futuro --shuffle vanilla")
|
||||||
# test("Keysanity ", "--shuffle vanilla --keydropshuffle --keysanity")
|
test("Keysanity ", "--shuffle vanilla --keydropshuffle --keysanity")
|
||||||
# test("Simple ", "--shuffle simple")
|
test("Simple ", "--shuffle simple")
|
||||||
# test("Full ", "--shuffle full")
|
test("Full ", "--shuffle full")
|
||||||
# test("Crossed ", "--shuffle crossed")
|
test("Crossed ", "--shuffle crossed")
|
||||||
# test("Insanity ", "--shuffle insanity")
|
test("Insanity ", "--shuffle insanity")
|
||||||
|
|
||||||
from tqdm import tqdm
|
from tqdm import tqdm
|
||||||
with tqdm(concurrent.futures.as_completed(task_mapping),
|
with tqdm(concurrent.futures.as_completed(task_mapping),
|
||||||
@@ -74,8 +74,8 @@ def main(args=None):
|
|||||||
|
|
||||||
def get_results(testname: str):
|
def get_results(testname: str):
|
||||||
result = ""
|
result = ""
|
||||||
# for mode in ['Open', 'Std ', 'Inv ']:
|
for mode in ['Open', 'Std ', 'Inv ']:
|
||||||
for mode in ['Open']:
|
# for mode in ['Open']:
|
||||||
dead_or_alive = [task.success for task in task_mapping if task.name == testname and task.mode == mode]
|
dead_or_alive = [task.success for task in task_mapping if task.name == testname and task.mode == mode]
|
||||||
alive = [x for x in dead_or_alive if x]
|
alive = [x for x in dead_or_alive if x]
|
||||||
success = f"{testname}{mode} Rate: {(len(alive) / len(dead_or_alive)) * 100:.2f}%"
|
success = f"{testname}{mode} Rate: {(len(alive) / len(dead_or_alive)) * 100:.2f}%"
|
||||||
@@ -111,10 +111,10 @@ if __name__ == "__main__":
|
|||||||
|
|
||||||
cpu_threads = args.cpu_threads
|
cpu_threads = args.cpu_threads
|
||||||
|
|
||||||
for dr in [['vanilla', args.count if args.count else 2, 1],
|
# for dr in [['vanilla', args.count if args.count else 2, 1],
|
||||||
['basic', args.count if args.count else 5, 3],
|
# ['basic', args.count if args.count else 5, 3],
|
||||||
['crossed', args.count if args.count else 10, 3]]:
|
# ['crossed', args.count if args.count else 10, 3]]:
|
||||||
# for dr in [['crossed', args.count if args.count else 10, 3]]:
|
for dr in [['basic', args.count if args.count else 10, 3]]:
|
||||||
|
|
||||||
for tense in range(1, dr[2] + 1):
|
for tense in range(1, dr[2] + 1):
|
||||||
args = argparse.Namespace()
|
args = argparse.Namespace()
|
||||||
|
|||||||
Reference in New Issue
Block a user