Exemplo n.º 1
0
 def test_to_toml_file(self):
     d = IODict({
         'x': 7,
         'y': 8,
         'z': 9,
         'a': 1,
         'b': 2,
         'c': 3,
     })
     filepath = self.output_path('test_to_toml_file.toml')
     d.to_toml(filepath=filepath)
     self.assertFileExists(filepath)
     self.assertEqual(d, IODict.from_toml(filepath))
Exemplo n.º 2
0
 def test_to_toml(self):
     d = IODict({
         'x': 7,
         'y': 8,
         'z': 9,
         'a': 1,
         'b': 2,
         'c': 3,
     })
     s = d.to_toml()
     self.assertEqual(d, IODict.from_toml(s))