From: Alec Warner Date: Mon, 26 Mar 2007 05:28:04 +0000 (-0000) Subject: fix tests for PortageModulesFile X-Git-Tag: v2.2_pre1~1534 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=3c9cb161da093b7f8fc6ede9ea694163347c0a22;p=portage.git fix tests for PortageModulesFile svn path=/main/trunk/; revision=6289 --- diff --git a/pym/portage/tests/env/config/test_PortageModulesFile.py b/pym/portage/tests/env/config/test_PortageModulesFile.py index 4d1b481e2..b523cbe7b 100644 --- a/pym/portage/tests/env/config/test_PortageModulesFile.py +++ b/pym/portage/tests/env/config/test_PortageModulesFile.py @@ -3,6 +3,7 @@ import os from portage.tests import TestCase from portage.env.config import PortageModulesFile from tempfile import mkstemp +from itertools import izip class PortageModulesFileTestCase(TestCase): @@ -10,7 +11,8 @@ class PortageModulesFileTestCase(TestCase): modules = ['spanky','zmedico','antarus','ricer'] def setUp(self): - for k,v in (self.keys, self.modules): + self.items = {} + for k,v in izip(self.keys, self.modules): self.items[k] = v def testPortageModulesFile(self): @@ -21,9 +23,10 @@ class PortageModulesFileTestCase(TestCase): self.NukeFile() def BuildFile(self): - fd,self.fname = mkstemp() - f = os.fdopen(self.fname, 'wb') - f.write('%s %s\n' % (self.cpv, ' '.join(self.keywords))) + fd, self.fname = mkstemp() + f = os.fdopen(fd, 'wb') + for k,v in self.items.iteritems(): + f.write('%s=%s\n' % (k,v)) f.close() def NukeFile(self):