]> git.rkrishnan.org Git - tahoe-lafs/tahoe-lafs.git/commitdiff
Revert [603f5eba32c98d4bfbc354530dcd36dfcd58887a] which was applied unintentionally.
authorDaira Hopwood <daira@jacaranda.org>
Mon, 5 May 2014 21:09:33 +0000 (22:09 +0100)
committerDaira Hopwood <daira@jacaranda.org>
Mon, 5 May 2014 21:09:33 +0000 (22:09 +0100)
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
src/allmydata/test/test_cli.py
src/allmydata/test/test_client.py
src/allmydata/test/test_util.py
src/allmydata/util/fileutil.py

index feca0d2fb283d52b512fd96560926a1bb3705f5c..7039ebb8744c31c0e1e01a805f71ae9d6ea42af0 100644 (file)
@@ -3744,7 +3744,7 @@ class Webopen(GridTestMixin, CLITestMixin, unittest.TestCase):
             raise
         return d
 
-class Options(ReallyEqualMixin, unittest.TestCase):
+class Options(unittest.TestCase):
     # this test case only looks at argument-processing and simple stuff.
 
     def parse(self, args, stdout=None):
@@ -3826,14 +3826,14 @@ class Options(ReallyEqualMixin, unittest.TestCase):
         # option after, or a basedir argument after, but none in the wrong
         # place, and not more than one of the three.
         o = self.parse(["start"])
-        self.failUnlessReallyEqual(o["basedir"], os.path.join(fileutil.abspath_expanduser_unicode(u"~"),
-                                                              u".tahoe"))
+        self.failUnlessEqual(o["basedir"], os.path.join(os.path.expanduser("~"),
+                                                        ".tahoe"))
         o = self.parse(["start", "here"])
-        self.failUnlessReallyEqual(o["basedir"], fileutil.abspath_expanduser_unicode(u"here"))
+        self.failUnlessEqual(o["basedir"], os.path.abspath("here"))
         o = self.parse(["start", "--basedir", "there"])
-        self.failUnlessReallyEqual(o["basedir"], fileutil.abspath_expanduser_unicode(u"there"))
+        self.failUnlessEqual(o["basedir"], os.path.abspath("there"))
         o = self.parse(["--node-directory", "there", "start"])
-        self.failUnlessReallyEqual(o["basedir"], fileutil.abspath_expanduser_unicode(u"there"))
+        self.failUnlessEqual(o["basedir"], os.path.abspath("there"))
 
         self.failUnlessRaises(usage.UsageError, self.parse,
                               ["--basedir", "there", "start"])
index 4a9fa5d486a7abf5ad0f85ead1441ed62edaafdb..796971b236140ed73e3872212ce90a72eb8c8e22 100644 (file)
@@ -1,4 +1,4 @@
-import os, sys
+import os
 from twisted.trial import unittest
 from twisted.application import service
 
@@ -45,11 +45,10 @@ class Basic(testutil.ReallyEqualMixin, unittest.TestCase):
         fileutil.write(os.path.join(basedir, "debug_discard_storage"), "")
 
         e = self.failUnlessRaises(OldConfigError, client.Client, basedir)
-        abs_basedir = fileutil.abspath_expanduser_unicode(unicode(basedir)).encode(sys.getfilesystemencoding())
-        self.failUnlessIn(os.path.join(abs_basedir, "introducer.furl"), e.args[0])
-        self.failUnlessIn(os.path.join(abs_basedir, "no_storage"), e.args[0])
-        self.failUnlessIn(os.path.join(abs_basedir, "readonly_storage"), e.args[0])
-        self.failUnlessIn(os.path.join(abs_basedir, "debug_discard_storage"), e.args[0])
+        self.failUnlessIn(os.path.abspath(os.path.join(basedir, "introducer.furl")), e.args[0])
+        self.failUnlessIn(os.path.abspath(os.path.join(basedir, "no_storage")), e.args[0])
+        self.failUnlessIn(os.path.abspath(os.path.join(basedir, "readonly_storage")), e.args[0])
+        self.failUnlessIn(os.path.abspath(os.path.join(basedir, "debug_discard_storage")), e.args[0])
 
         for oldfile in ['introducer.furl', 'no_storage', 'readonly_storage',
                         'debug_discard_storage']:
index e45d7ef166ce1849a9d96e3526f80ed7ba3341d4..b527771d76f2520e3e5ee7a99debf8707954b705 100644 (file)
@@ -488,10 +488,7 @@ class FileUtil(unittest.TestCase):
         abspath_cwd = fileutil.abspath_expanduser_unicode(u".")
         self.failUnless(isinstance(saved_cwd, unicode), saved_cwd)
         self.failUnless(isinstance(abspath_cwd, unicode), abspath_cwd)
-        if sys.platform == "win32":
-            self.failUnlessEqual(abspath_cwd, u"\\\\?\\" + saved_cwd)
-        else:
-            self.failUnlessEqual(abspath_cwd, saved_cwd)
+        self.failUnlessEqual(abspath_cwd, saved_cwd)
 
         # adapted from <http://svn.python.org/view/python/branches/release26-maint/Lib/test/test_posixpath.py?view=markup&pathrev=78279#test_abspath>
 
index 87650848ace95c98da05e124730276c9847bd634..8eb8e9fb6cd360a74fdc4c62147bc0fd0b98df09 100644 (file)
@@ -311,12 +311,7 @@ def abspath_expanduser_unicode(path):
 
     # We won't hit <http://bugs.python.org/issue5827> because
     # there is always at least one Unicode path component.
-    path = os.path.normpath(path)
-
-    if sys.platform == "win32" and not path.startswith(u"\\\\"):
-        path = u"\\\\?\\" + path
-
-    return path
+    return os.path.normpath(path)
 
 
 have_GetDiskFreeSpaceExW = False