Initial implementation of exiftool command, #691 (#696)

* Initial implementation of exiftool command, #691

* updated comment [skip ci]
This commit is contained in:
Rhet Turnbull
2022-05-20 22:12:48 -07:00
committed by GitHub
parent 6d5af5c5e8
commit 79e4b333e9
15 changed files with 763 additions and 41 deletions

View File

@@ -1,6 +1,8 @@
""" test ConfigOptions class """
import pathlib
from io import StringIO
import pytest
import toml
@@ -43,6 +45,15 @@ def test_write_to_file_load_from_file(tmpdir):
assert cfg2.bar
def test_load_from_str(tmpdir):
cfg = ConfigOptions("test", VARS)
cfg.bar = True
cfg_str = cfg.write_to_str()
cfg2 = ConfigOptions("test", VARS).load_from_str(cfg_str)
assert cfg2.foo == "bar"
assert cfg2.bar
def test_load_from_file_error(tmpdir):
cfg_file = pathlib.Path(str(tmpdir)) / "test.toml"
cfg = ConfigOptions("test", VARS)