Beispiel #1
0
 def test_filename(self):
     figs.dump(self.conf, self.target_filename)
     with open(self.target_filename) as f:
         self.assertEqual(f.read(), self.conf_content)
Beispiel #2
0
 def test_file(self):
     sio = StringIO()
     figs.dump(self.conf, sio)
     self.assertEqual(sio.getvalue(), self.conf_content)
     self.assertFalse(sio.closed)
Beispiel #3
0
 def test_section_filename(self):
     figs.dump(self.conf.default, self.target_filename)
     with open(self.target_filename) as f:
         self.assertEqual(f.read(), self.conf_content.split(None, 1)[-1])