Ejemplo n.º 1
0
 def testexport(self):
     # Braindead test: just check the length of the emitted file
     self.outname = os.path.join(self.dirname, 'export.env')
     self.x.export(self.dirname, format='env', fh=open(self.outname, 'w'))
     self.ref = envgetter.parsefile(self.outname)
     os.unlink(self.outname)
     self.assertEqual(len(self.ref), len(
         self.x.nodes[self.dirname].final) - len(self.x.defdict))
Ejemplo n.º 2
0
 def testexport(self):
     self.x.populate(self.dirname)
     self.x.export(self.dirname, format='env', fh=open(self.outname, 'w'))
     tst = envgetter.parsefile(self.outname)
     os.unlink(self.outname)
     self.assertEqual(self.ref, tst)
Ejemplo n.º 3
0
 def setUp(self):
     self.dirname = 'testtree/pdkenv/a/e'
     self.x = envgetter.EnvGetter(defdict={})
     self.outname = 'testtree/pdkenv/a/e/test_export.dat'
     self.ref = envgetter.parsefile('testtree/pdkenv/a/e/exported_env')