From: Daira Hopwood Date: Thu, 5 Feb 2015 02:13:23 +0000 (+0000) Subject: Test the quotemarks=False option of encodingutil.quote_path. X-Git-Tag: allmydata-tahoe-1.10.1a1~74 X-Git-Url: https://git.rkrishnan.org/(%5B%5E?a=commitdiff_plain;h=d53c7ee905dcc1967dd42916c7a4d05b74e4e5f9;p=tahoe-lafs%2Ftahoe-lafs.git Test the quotemarks=False option of encodingutil.quote_path. Signed-off-by: Daira Hopwood --- diff --git a/src/allmydata/test/test_encodingutil.py b/src/allmydata/test/test_encodingutil.py index 926c3659..4621a196 100644 --- a/src/allmydata/test/test_encodingutil.py +++ b/src/allmydata/test/test_encodingutil.py @@ -400,8 +400,10 @@ class QuotePaths(ReallyEqualMixin, unittest.TestCase): def test_quote_path(self): self.failUnlessReallyEqual(quote_path([u'foo', u'bar']), "'foo/bar'") self.failUnlessReallyEqual(quote_path([u'foo', u'bar'], quotemarks=True), "'foo/bar'") + self.failUnlessReallyEqual(quote_path([u'foo', u'bar'], quotemarks=False), "foo/bar") self.failUnlessReallyEqual(quote_path([u'foo', u'\nbar']), '"foo/\\x0abar"') self.failUnlessReallyEqual(quote_path([u'foo', u'\nbar'], quotemarks=True), '"foo/\\x0abar"') + self.failUnlessReallyEqual(quote_path([u'foo', u'\nbar'], quotemarks=False), '"foo/\\x0abar"') self.failUnlessReallyEqual(quote_local_unicode_path(u"\\\\?\\C:\\foo"), "'C:\\foo'" if sys.platform == "win32" else "'\\\\?\\C:\\foo'")