1 |
Author: zmedico |
2 |
Date: 2009-02-27 03:54:57 +0000 (Fri, 27 Feb 2009) |
3 |
New Revision: 12724 |
4 |
|
5 |
Modified: |
6 |
main/trunk/pym/portage/tests/sets/files/testConfigFileSet.py |
7 |
Log: |
8 |
Open the temp file in text mode for py3k compatibility. |
9 |
|
10 |
|
11 |
Modified: main/trunk/pym/portage/tests/sets/files/testConfigFileSet.py |
12 |
=================================================================== |
13 |
--- main/trunk/pym/portage/tests/sets/files/testConfigFileSet.py 2009-02-27 03:46:40 UTC (rev 12723) |
14 |
+++ main/trunk/pym/portage/tests/sets/files/testConfigFileSet.py 2009-02-27 03:54:57 UTC (rev 12724) |
15 |
@@ -13,13 +13,15 @@ |
16 |
|
17 |
def setUp(self): |
18 |
fd, self.testfile = tempfile.mkstemp(suffix=".testdata", prefix=self.__class__.__name__, text=True) |
19 |
+ os.close(fd) |
20 |
+ f = open(self.testfile, 'w') |
21 |
for i in range(0, len(test_cps)): |
22 |
atom = test_cps[i] |
23 |
if i % 2 == 0: |
24 |
- os.write(fd, atom+" abc def"+"\n") |
25 |
+ f.write(atom + ' abc def\n') |
26 |
else: |
27 |
- os.write(fd, atom+"\n") |
28 |
- os.close(fd) |
29 |
+ f.write(atom + '\n') |
30 |
+ f.close() |
31 |
|
32 |
def tearDown(self): |
33 |
os.unlink(self.testfile) |