Skip to content

Commit

Permalink
Use cross-platform shutil.rmtree instead of UNIX-specific 'rm -rf'.
Browse files Browse the repository at this point in the history
6bc239224dc3ee2923fd38e456d5850b316ef823
  • Loading branch information
andrey-khropov committed Apr 10, 2024
1 parent 5c80df8 commit f952f1a
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion catboost/pytest/test.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
import pandas as pd
import timeit
import json
import shutil

import catboost

Expand Down Expand Up @@ -9294,7 +9295,9 @@ def stop_after_timeout(cmd, timeout):
for idx in range(resume_from_snapshot_count):
timeout = 0.5 if idx % 2 == 0 else snapshot_interval + 0.1
stop_after_timeout(cmd=eval_with_snapshot_cmd, timeout=timeout)
yatest.common.execute(['rm', '-rf', snapshot_dir])
if os.path.exists(snapshot_dir):
shutil.rmtree(snapshot_dir)

yatest.common.execute(eval_with_snapshot_cmd)

assert filecmp.cmp(reference_summary, snapshot_summary)
Expand Down

0 comments on commit f952f1a

Please sign in to comment.