def test_to_yaml_file(self): d = IODict({ 'x': 7, 'y': 8, 'z': 9, 'a': 1, 'b': 2, 'c': 3, }) filepath = self.output_path('test_to_yaml_file.yml') d.to_yaml(filepath=filepath) self.assertFileExists(filepath) self.assertEqual(d, IODict.from_yaml(filepath))
def test_to_yaml(self): d = IODict({ 'x': 7, 'y': 8, 'z': 9, 'a': 1, 'b': 2, 'c': 3, }) s = d.to_yaml() self.assertEqual(d, IODict.from_yaml(s))