]> granicus.if.org Git - python/commitdiff
Use a skipUnless decorator instead of conditional renaming.
authorBrett Cannon <brett@python.org>
Fri, 20 Apr 2012 20:29:39 +0000 (16:29 -0400)
committerBrett Cannon <brett@python.org>
Fri, 20 Apr 2012 20:29:39 +0000 (16:29 -0400)
Lib/test/test_import.py

index f02681a3408670d50d61ed665059a2ea227a84b0..1b57432553d95584a525471aaa71fefab6e1955e 100644 (file)
@@ -455,6 +455,7 @@ class PathsTests(unittest.TestCase):
         unload("test_trailing_slash")
 
     # Regression test for http://bugs.python.org/issue3677.
+    @unittest.skipUnless(sys.platform == 'win32', 'Windows-specific')
     def _test_UNC_path(self):
         with open(os.path.join(self.path, 'test_trailing_slash.py'), 'w') as f:
             f.write("testdata = 'test_trailing_slash'")
@@ -470,9 +471,6 @@ class PathsTests(unittest.TestCase):
         self.assertEqual(mod.testdata, 'test_trailing_slash')
         unload("test_trailing_slash")
 
-    if sys.platform == "win32":
-        test_UNC_path = _test_UNC_path
-
 
 class RelativeImportTests(unittest.TestCase):