diff --git a/src/sinol_make/helpers/package_util.py b/src/sinol_make/helpers/package_util.py index b07c0aea..3bc310a6 100644 --- a/src/sinol_make/helpers/package_util.py +++ b/src/sinol_make/helpers/package_util.py @@ -53,10 +53,6 @@ def get_solutions_re(task_id: str) -> re.Pattern: return re.compile(r"^%s[bs]?[0-9]*\.(cpp|cc|java|py|pas)$" % task_id) -def get_solutions_re(task_id): - return re.compile(r"^%s[bs]?[0-9]*\.(cpp|cc|java|py|pas)$" % task_id) - - def get_executable_key(executable): name = get_file_name(executable) value = [0, 0] diff --git a/tests/commands/run/test_integration.py b/tests/commands/run/test_integration.py index dbda4fb8..cc1df96b 100644 --- a/tests/commands/run/test_integration.py +++ b/tests/commands/run/test_integration.py @@ -611,7 +611,8 @@ def run(): end_time = time.time() - start_time assert end_time - start_time < length / 2 - solutions = command.get_solutions(None) + task_id = package_util.get_task_id() + solutions = package_util.get_solutions(task_id, None) for solution in solutions: cache_file: CacheFile = cache.get_cache_file(solution) for test in command.tests: @@ -647,7 +648,8 @@ def test_results_caching_checker_changed(create_package, time_tool): # Compile checker check if test results are removed. command.compile_checker() - solutions = command.get_solutions(None) + task_id = package_util.get_task_id() + solutions = package_util.get_solutions(task_id, None) for solution in solutions: cache_file: CacheFile = cache.get_cache_file(solution) assert cache_file.tests == {} @@ -678,7 +680,8 @@ def test(file_to_change, lang, comment_character): change_file(os.path.join(os.getcwd(), "prog", file_to_change), comment_character) cache.save_to_cache_extra_compilation_files(command.config.get("extra_compilation_files", []), command.ID) - solutions = command.get_solutions(None) + task_id = package_util.get_task_id() + solutions = package_util.get_solutions(task_id, None) for solution in solutions: if package_util.get_file_lang(solution) == lang: print(file_to_change, solution)