Ignore:
Timestamp:
Mar 19, 2014, 11:31:01 PM (11 years ago)
Author:
dmik
Message:

python: Merge vendor 2.7.6 to trunk.

Location:
python/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • python/trunk

  • python/trunk/Lib/test/test_uu.py

    r2 r391  
    4949        try:
    5050            uu.decode(inp, out)
    51             self.fail("No exception thrown")
     51            self.fail("No exception raised")
    5252        except uu.Error, e:
    5353            self.assertEqual(str(e), "Truncated input file")
     
    5858        try:
    5959            uu.decode(inp, out)
    60             self.fail("No exception thrown")
     60            self.fail("No exception raised")
    6161        except uu.Error, e:
    6262            self.assertEqual(str(e), "No valid begin line found in input file")
     
    162162            self._kill(f)
    163163
     164    def test_decode_filename(self):
     165        f = None
     166        try:
     167            test_support.unlink(self.tmpin)
     168            f = open(self.tmpin, 'w')
     169            f.write(encodedtextwrapped % (0644, self.tmpout))
     170            f.close()
     171
     172            uu.decode(self.tmpin)
     173
     174            f = open(self.tmpout, 'r')
     175            s = f.read()
     176            f.close()
     177            self.assertEqual(s, plaintext)
     178        finally:
     179            self._kill(f)
     180
    164181    def test_decodetwice(self):
    165182        # Verify that decode() will refuse to overwrite an existing file
Note: See TracChangeset for help on using the changeset viewer.