mirror of
https://github.com/python/cpython.git
synced 2025-10-17 12:18:23 +00:00
Add a test for uu.encode() that passed filenames as
in_file and out_file.
This commit is contained in:
parent
c69d1c498f
commit
705fd474e9
1 changed files with 8 additions and 0 deletions
|
@ -128,6 +128,14 @@ class UUFileTest(unittest.TestCase):
|
||||||
s = fout.read()
|
s = fout.read()
|
||||||
fout.close()
|
fout.close()
|
||||||
self.assertEqual(s, encodedtextwrapped % (0644, self.tmpin))
|
self.assertEqual(s, encodedtextwrapped % (0644, self.tmpin))
|
||||||
|
|
||||||
|
# in_file and out_file as filenames
|
||||||
|
uu.encode(self.tmpin, self.tmpout, mode=0644)
|
||||||
|
fout = open(self.tmpout, 'r')
|
||||||
|
s = fout.read()
|
||||||
|
fout.close()
|
||||||
|
self.assertEqual(s, encodedtextwrapped % (0644, self.tmpin))
|
||||||
|
|
||||||
finally:
|
finally:
|
||||||
self._kill(fin)
|
self._kill(fin)
|
||||||
self._kill(fout)
|
self._kill(fout)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue