Skip to content

Commit

Permalink
refactor(types): use compress = True by default (after test of time) (#…
Browse files Browse the repository at this point in the history
…221)

* refactor(types): use compress = True by default (after test of time)

* fix(test_types): set compress=False
  • Loading branch information
HiroIshida committed Sep 24, 2022
1 parent 651c7e0 commit ec53c35
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion mohou/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -1107,7 +1107,7 @@ def dump(
project_path: Path,
postfix: Optional[str] = None,
exist_ok: bool = False,
compress: bool = False,
compress: bool = True,
) -> None:
"""dump the bundle
Expand Down
4 changes: 2 additions & 2 deletions tests/unittest/test_types.py
Original file line number Diff line number Diff line change
Expand Up @@ -480,7 +480,7 @@ def test_episode_bundle(image_av_bundle, image_bundle): # noqa
bundle: EpisodeBundle = image_av_bundle
assert set(bundle.types()) == set([AngleVector, RGBImage, TerminateFlag])

bundle.dump(tmp_project_path)
bundle.dump(tmp_project_path, compress=False)
assert (tmp_project_path, None) not in _bundle_cache
loaded = bundle.load(tmp_project_path)
assert bundle == loaded
Expand All @@ -489,7 +489,7 @@ def test_episode_bundle(image_av_bundle, image_bundle): # noqa
# test having multiple bundle in one project
postfix = "extra"
extra_bundle: EpisodeBundle = image_bundle
extra_bundle.dump(tmp_project_path, postfix)
extra_bundle.dump(tmp_project_path, postfix, compress=False)
extra_bundle_loaded = EpisodeBundle.load(tmp_project_path, postfix)
assert extra_bundle == extra_bundle_loaded

Expand Down

0 comments on commit ec53c35

Please sign in to comment.