svn path=/main/trunk/; revision=12725
def setUp(self):
fd, self.testfile = tempfile.mkstemp(suffix=".testdata", prefix=self.__class__.__name__, text=True)
- os.close(fd)
- f = open(self.testfile, 'w')
+ f = os.fdopen(fd, 'w')
for i in range(0, len(test_cps)):
atom = test_cps[i]
if i % 2 == 0:
def setUp(self):
fd, self.testfile = tempfile.mkstemp(suffix=".testdata", prefix=self.__class__.__name__, text=True)
- os.close(fd)
- open(self.testfile, 'w').write("\n".join(test_cps))
+ f = os.fdopen(fd, 'w')
+ f.write("\n".join(test_cps))
+ f.close()
def tearDown(self):
os.unlink(self.testfile)