Skip to content

Commit

Permalink
created test for issue #54
Browse files Browse the repository at this point in the history
  • Loading branch information
verginer committed Apr 21, 2018
1 parent a0277d5 commit a17083e
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions tests/test_MultiOrderModel.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,3 +104,14 @@ def test_estimate_order_2():

m = pp.MultiOrderModel(paths)
assert m.estimate_order() == 2


def test_save_statefile(random_paths, tmpdir):
file_path = str(tmpdir.join("statefile.sf"))
print(file_path)
p = random_paths(3, 20, 6)
multi = pp.MultiOrderModel(p, max_order=2)
multi.save_state_file(file_path, layer=2)
with open(file_path) as f:
for line in f:
assert '{' not in line # make sure that we did not write a dictionary

0 comments on commit a17083e

Please sign in to comment.