From bbdc9cd3d2cbdc2cc64d2945da175bdc18a93ce3 Mon Sep 17 00:00:00 2001 From: Brett Cannon Date: Fri, 20 Apr 2012 16:29:39 -0400 Subject: Use a skipUnless decorator instead of conditional renaming. --- Lib/test/test_import.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/Lib/test/test_import.py b/Lib/test/test_import.py index f02681a..1b57432 100644 --- a/Lib/test/test_import.py +++ b/Lib/test/test_import.py @@ -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): -- cgit v0.12