projects
/
portage.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
223c15a
)
Open the temp file in text mode for py3k compatibility.
author
Zac Medico
<zmedico@gentoo.org>
Fri, 27 Feb 2009 03:54:57 +0000
(
03:54
-0000)
committer
Zac Medico
<zmedico@gentoo.org>
Fri, 27 Feb 2009 03:54:57 +0000
(
03:54
-0000)
svn path=/main/trunk/; revision=12724
pym/portage/tests/sets/files/testConfigFileSet.py
patch
|
blob
|
history
diff --git
a/pym/portage/tests/sets/files/testConfigFileSet.py
b/pym/portage/tests/sets/files/testConfigFileSet.py
index 5a54e6a7866793f65c3d56bb93bbe112e23eb6b0..a7a9645cd505cf73ccf71778ce394f5a7174355c 100644
(file)
--- a/
pym/portage/tests/sets/files/testConfigFileSet.py
+++ b/
pym/portage/tests/sets/files/testConfigFileSet.py
@@
-13,13
+13,15
@@
class ConfigFileSetTestCase(TestCase):
def setUp(self):
fd, self.testfile = tempfile.mkstemp(suffix=".testdata", prefix=self.__class__.__name__, text=True)
+ os.close(fd)
+ f = open(self.testfile, 'w')
for i in range(0, len(test_cps)):
atom = test_cps[i]
if i % 2 == 0:
-
os.write(fd, atom+" abc def"+"\n"
)
+
f.write(atom + ' abc def\n'
)
else:
-
os.write(fd, atom+"\n"
)
-
os.close(fd
)
+
f.write(atom + '\n'
)
+
f.close(
)
def tearDown(self):
os.unlink(self.testfile)