]> granicus.if.org Git - python/commitdiff
Add a test for uu.encode() that passed filenames as
authorWalter Dörwald <walter@livinglogic.de>
Mon, 21 Nov 2005 18:55:56 +0000 (18:55 +0000)
committerWalter Dörwald <walter@livinglogic.de>
Mon, 21 Nov 2005 18:55:56 +0000 (18:55 +0000)
in_file and out_file.

Lib/test/test_uu.py

index 26d1a7ab4fe96f6a4d1c04804b37de1c718eb010..7786316e9d49eb4577e8c2a1e48bd9293fd7c2aa 100644 (file)
@@ -128,6 +128,14 @@ class UUFileTest(unittest.TestCase):
             s = fout.read()
             fout.close()
             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:
             self._kill(fin)
             self._kill(fout)