Skip to content

Commit

Permalink
fixed test
Browse files Browse the repository at this point in the history
  • Loading branch information
mgiulini committed Feb 2, 2024
1 parent 8305875 commit 50aee88
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions tests/test_cli_analyse.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
import os
import shutil
from pathlib import Path
import tempfile

import pytest

Expand Down Expand Up @@ -88,9 +89,8 @@ def test_main(example_capri_ss, example_capri_clt):

def test_zip_top_ranked(example_capri_ss):
"""Test cli_analyse zip_top_ranked function."""
import tempfile
cwd = os.getcwd()
with tempfile.TemporaryDirectory() as tmpdir:
print(tmpdir)
os.chdir(tmpdir)
# build fake run_dir
rigid_dir = "1_rigidbody"
Expand All @@ -104,4 +104,5 @@ def test_zip_top_ranked(example_capri_ss):
exp_cl_ranking = {1: 2}
zip_top_ranked(example_capri_ss, exp_cl_ranking, "summary.tgz")
assert os.path.isfile("summary.tgz") is True
os.chdir(cwd)

0 comments on commit 50aee88

Please sign in to comment.