Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
MasloMaslane committed Sep 23, 2023
1 parent cba75a1 commit feb0c7a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
4 changes: 0 additions & 4 deletions src/sinol_make/helpers/package_util.py
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down
9 changes: 6 additions & 3 deletions tests/commands/run/test_integration.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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 == {}
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit feb0c7a

Please sign in to comment.