예제 #1
0
파일: tests.py 프로젝트: sharat87/figs
 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)
예제 #2
0
파일: tests.py 프로젝트: sharat87/figs
 def test_file(self):
     sio = StringIO()
     figs.dump(self.conf, sio)
     self.assertEqual(sio.getvalue(), self.conf_content)
     self.assertFalse(sio.closed)
예제 #3
0
파일: tests.py 프로젝트: sharat87/figs
 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])