summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--pym/portage/tests/sets/files/testConfigFileSet.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/pym/portage/tests/sets/files/testConfigFileSet.py b/pym/portage/tests/sets/files/testConfigFileSet.py
index 5a54e6a78..a7a9645cd 100644
--- 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)