Add test to ensure `end_time: null` is not dumped

pull/357/head
nyanpasu64 2019-01-08 16:21:46 -08:00
rodzic 40b2b31d76
commit c9a62e12bb
1 zmienionych plików z 5 dodań i 0 usunięć

Wyświetl plik

@ -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