From 80e9830758781e46a283e493a3c2f902969c0bea Mon Sep 17 00:00:00 2001 From: Nathanael Sensfelder Date: Mon, 18 Sep 2017 14:36:37 +0200 Subject: Starting to work on test automation. --- data/test/oracle_creator.py | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100755 data/test/oracle_creator.py (limited to 'data/test/oracle_creator.py') diff --git a/data/test/oracle_creator.py b/data/test/oracle_creator.py new file mode 100755 index 0000000..8ef5a14 --- /dev/null +++ b/data/test/oracle_creator.py @@ -0,0 +1,18 @@ +#!/usr/bin/env python3 +import sys + +solutions = list() + +for line in sys.stdin.readlines(): + line_data = line.split(":") + line_number = line_data[0] + solution_number = int(line_data[2]) + solution_item_number = line_data[3].replace("$",'') + + if (len(solutions) <= solution_number): + solutions.insert(solution_number, list()) + + solutions[solution_number].insert(int(solution_item_number), line_number) + +for sol in solutions: + print("(" + (' '.join(sol)) + ")") -- cgit v1.2.3-70-g09d2