kopia lustrzana https://github.com/corrscope/corrscope
Add test to ensure `end_time: null` is not dumped
rodzic
40b2b31d76
commit
c9a62e12bb
|
@ -46,6 +46,11 @@ def yaml_sink(_mocker, command: str):
|
|||
assert isinstance(cfg, Config)
|
||||
|
||||
yaml_dump = yaml.dump(cfg)
|
||||
|
||||
# YAML Representer.ignore_aliases() should return True for Enums.
|
||||
# If it returns True for other types, "null" is dumped explicitly, which is ugly.
|
||||
assert "end_time: null" not in yaml_dump
|
||||
|
||||
cfg_round_trip = yaml.load(yaml_dump)
|
||||
assert cfg_round_trip == cfg, yaml_dump
|
||||
|
||||
|
|
Ładowanie…
Reference in New Issue