Closed frankenjoe closed 1 year ago
Merging #62 (71500bc) into master (e95d5c7) will not change coverage. The diff coverage is
100.0%
.
Impacted Files | Coverage Δ | |
---|---|---|
audobject/core/object.py | 100.0% <100.0%> (ø) |
I wasn't sure what to expect for the other resolvers and added the following test cases.
For FilePath
:
yaml_path = os.path.join(root, 'yaml', 'none.yaml')
o = ObjectWithFile(None)
o.to_yaml(yaml_path, include_version=False)
o2 = audobject.from_yaml(yaml_path)
assert o == o2
and for Function
:
o_none = ObjectWithFunction(None)
path = os.path.join(tmpdir, 'none.yaml')
o_none.to_yaml(path, include_version=False)
o_none_2 = audobject.from_yaml(path)
assert o_none == o_none_2
assert o_none.to_yaml_s(include_version=False) == \
o_none_2.to_yaml_s(include_version=False)
Both tests passed. Is it obvious that they should pass or would it make sense to include them as well?
Is it obvious that they should pass or would it make sense to include them as well?
Now we only call a resolver if the value that needs to be encoded is not None
. So I would say it's obvious.
Fixes #61 and adds a test for it.