Skip to content

Commit

Permalink
Make pickle test self contained
Browse files Browse the repository at this point in the history
  • Loading branch information
pabloferz committed Jan 4, 2024
1 parent 934b42f commit 6ef2bde
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 3 deletions.
Binary file removed tests/test_abf_result.pickle
Binary file not shown.
6 changes: 3 additions & 3 deletions tests/test_pickle.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

import dill as pickle
import numpy as np
import test_simulations.abf as abf_example

import pysages
import pysages.colvars
Expand Down Expand Up @@ -167,10 +168,9 @@ def test_pickle_colvars():


def test_pickle_results():
with open("tests/test_abf_result.pickle", "rb") as f:
test_result = pickle.load(f)

with tempfile.NamedTemporaryFile() as tmp_pickle:
test_result = abf_example.run_simulation(10, write_output=False)

pickle.dump(test_result, tmp_pickle)
tmp_pickle.flush()

Expand Down
Empty file.
1 change: 1 addition & 0 deletions tests/test_simulations/abf.py

0 comments on commit 6ef2bde

Please sign in to comment.