~ubuntu-branches/ubuntu/natty/python3.1/natty-security

« back to all changes in this revision

Viewing changes to Lib/test/test_pipes.py

  • Committer: Bazaar Package Importer
  • Author(s): Matthias Klose
  • Date: 2010-07-06 16:52:42 UTC
  • mfrom: (1.2.1 upstream) (2.1.11 sid)
  • Revision ID: james.westby@ubuntu.com-20100706165242-2xv4i019r3et6c0j
Tags: 3.1.2+20100706-1ubuntu1
* Merge with Debian; remaining changes:
  - Regenerate the control file.
  - Add debian/patches/overwrite-semaphore-check for Lucid buildds.

Show diffs side-by-side

added added

removed removed

Lines of Context:
62
62
        self.assertEqual(open(TESTFN).read(), d)
63
63
 
64
64
    def testQuoting(self):
65
 
        safeunquoted = string.ascii_letters + string.digits + '!@%_-+=:,./'
66
 
        unsafe = '"`$\\'
 
65
        safeunquoted = string.ascii_letters + string.digits + '@%_-+=:,./'
 
66
        unsafe = '"`$\\!'
67
67
 
 
68
        self.assertEqual(pipes.quote(''), "''")
68
69
        self.assertEqual(pipes.quote(safeunquoted), safeunquoted)
69
70
        self.assertEqual(pipes.quote('test file name'), "'test file name'")
70
71
        for u in unsafe:
72
73
                              "'test%sname'" % u)
73
74
        for u in unsafe:
74
75
            self.assertEqual(pipes.quote("test%s'name'" % u),
75
 
                              '"test\\%s\'name\'"' % u)
 
76
                             "'test%s'\"'\"'name'\"'\"''" % u)
76
77
 
77
78
    def testRepr(self):
78
79
        t = pipes.Template()