Skip to content

Commit

Permalink
Don't use /tmp
Browse files Browse the repository at this point in the history
Windows OS does not support `/tmp`.
  • Loading branch information
ioannis-vm committed May 18, 2024
1 parent afd55e8 commit 92fe50f
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions pelicun/tests/validation/1/test_1.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@
"""

import tempfile
import numpy as np
import pandas as pd
import pelicun
Expand Down Expand Up @@ -159,6 +160,7 @@ def test_validation_ds_probabilities():
asmnt.damage.ds_model.sample = asmnt.damage.ds_model.sample.iloc[0:100, :]
# (we reduce the number of realizations to conserve resources)
before = asmnt.damage.ds_model.sample.copy()
asmnt.damage.save_sample('/tmp/mdl.csv')
asmnt.damage.load_sample('/tmp/mdl.csv')
temp_dir = tempfile.mkdtemp()
asmnt.damage.save_sample(f'{temp_dir}/mdl.csv')
asmnt.damage.load_sample(f'{temp_dir}/mdl.csv')
pd.testing.assert_frame_equal(before, asmnt.damage.ds_model.sample)

0 comments on commit 92fe50f

Please sign in to comment.