From: Daira Hopwood Date: Tue, 21 Apr 2015 20:28:21 +0000 (+0100) Subject: Fix a test that was dependent on Windows path separators. X-Git-Tag: allmydata-tahoe-1.10.1a1~33 X-Git-Url: https://git.rkrishnan.org/simplejson/components/com_hotproperty/%5B%5E?a=commitdiff_plain;h=e6cede21f226e639ff49825db8d757108854ff5b;p=tahoe-lafs%2Ftahoe-lafs.git Fix a test that was dependent on Windows path separators. Signed-off-by: Daira Hopwood --- diff --git a/src/allmydata/test/test_util.py b/src/allmydata/test/test_util.py index 6c67fcc5..f2da9c4b 100644 --- a/src/allmydata/test/test_util.py +++ b/src/allmydata/test/test_util.py @@ -488,10 +488,10 @@ class FileUtil(ReallyEqualMixin, unittest.TestCase): # adapted from foo = fileutil.abspath_expanduser_unicode(u"foo") - self.failUnless(foo.endswith(u"\\foo"), foo) + self.failUnless(foo.endswith(u"%sfoo" % (os.path.sep,)), foo) foobar = fileutil.abspath_expanduser_unicode(u"bar", base=foo) - self.failUnless(foobar.endswith(u"\\foo\\bar"), foobar) + self.failUnless(foobar.endswith(u"%sfoo%sbar" % (os.path.sep, os.path.sep)), foobar) if sys.platform == "win32": # This is checking that a drive letter is added for a path without one.