Rev 4683: Mix up the test a bit. On Windows we don't run the '/' test in http://bazaar.launchpad.net/~jameinel/bzr/2.0.1-322807-branch-at-root

John Arbash Meinel john at arbash-meinel.com
Thu Oct 8 18:13:44 BST 2009


At http://bazaar.launchpad.net/~jameinel/bzr/2.0.1-322807-branch-at-root

------------------------------------------------------------
revno: 4683
revision-id: john at arbash-meinel.com-20091008171324-qir5pegvemi4n433
parent: john at arbash-meinel.com-20091008040525-t1q1zez3h2x2yqpj
committer: John Arbash Meinel <john at arbash-meinel.com>
branch nick: 2.0.1-322807-branch-at-root
timestamp: Thu 2009-10-08 12:13:24 -0500
message:
  Mix up the test a bit. On Windows we don't run the '/' test
  and on Linux, we don't run the C:/ tests.
-------------- next part --------------
=== modified file 'bzrlib/tests/test_osutils.py'
--- a/bzrlib/tests/test_osutils.py	2009-10-08 03:58:02 +0000
+++ b/bzrlib/tests/test_osutils.py	2009-10-08 17:13:24 +0000
@@ -481,15 +481,19 @@
         self.assertRelpath('MixedCaseParent/not_child', base,
                            'MixedCaseParent/not_child')
 
-    def test_at_slash(self):
+    def test_at_root_slash(self):
         # We can't test this on Windows, because it has a 'MIN_ABS_PATHLENGTH'
         # check...
         if osutils.MIN_ABS_PATHLENGTH > 1:
-            return TestSkipped('relpath requires %d chars'
-                               % osutils.MIN_ABS_PATHLENGTH)
+            raise tests.TestSkipped('relpath requires %d chars'
+                                    % osutils.MIN_ABS_PATHLENGTH)
         self.assertRelpath('foo', '/', '/foo')
 
-    def test_at_root(self):
+    def test_at_root_drive(self):
+        if sys.platform != 'win32':
+            raise tests.TestNotApplicable('we can only test drive-letter relative'
+                                          ' paths on Windows where we have drive'
+                                          ' letters.')
         # see bug #322807
         # The specific issue is that when at the root of a drive, 'abspath'
         # returns "C:/" or just "/". However, the code assumes that abspath



More information about the bazaar-commits mailing list