Skip to content

Commit

Permalink
Update the serialization test
Browse files Browse the repository at this point in the history
  • Loading branch information
BoxiLi committed Jun 13, 2024
1 parent 0a1e990 commit 441727b
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 2 deletions.
Binary file removed tests/test_dump_result/oct_result.dump
Binary file not shown.
4 changes: 2 additions & 2 deletions tests/test_result_serialization.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ def dumpfile_unfinalized(request, tmpdir, caplog):
testdir = os.path.splitext(request.module.__file__)[0]
with caplog.at_level(logging.WARNING):
result = Result.load(os.path.join(testdir, 'oct_result.dump'))
assert len(result.optimized_controls) == 1
assert len(result.optimized_controls) == 4
result.optimized_controls[0] = np.concatenate(
(result.optimized_controls[0][0:-2], [0.0])
)
Expand All @@ -65,7 +65,7 @@ def dumpfile_broken(request, tmpdir, caplog):
testdir = os.path.splitext(request.module.__file__)[0]
with caplog.at_level(logging.WARNING):
result = Result.load(os.path.join(testdir, 'oct_result.dump'))
assert len(result.optimized_controls) == 1
assert len(result.optimized_controls) == 4
result.optimized_controls[0] = np.array([0.0, 0.0])
dumpfile = str(tmpdir.join('oct_result_broken.dump'))
result.dump(dumpfile)
Expand Down
Binary file modified tests/test_result_serialization/oct_result.dump
Binary file not shown.

0 comments on commit 441727b

Please sign in to comment.