summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlec Warner <antarus@gentoo.org>2007-03-26 05:28:04 +0000
committerAlec Warner <antarus@gentoo.org>2007-03-26 05:28:04 +0000
commit3c9cb161da093b7f8fc6ede9ea694163347c0a22 (patch)
tree22ebde72607b4cb318382658bd6c1351a332cc83
parentd80792f4c02169178cbf0885b19c7948e5648758 (diff)
downloadportage-3c9cb161da093b7f8fc6ede9ea694163347c0a22.tar.gz
portage-3c9cb161da093b7f8fc6ede9ea694163347c0a22.tar.bz2
portage-3c9cb161da093b7f8fc6ede9ea694163347c0a22.zip
fix tests for PortageModulesFile
svn path=/main/trunk/; revision=6289
-rw-r--r--pym/portage/tests/env/config/test_PortageModulesFile.py11
1 files changed, 7 insertions, 4 deletions
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):