Use a skipUnless decorator instead of conditional renaming.

This commit is contained in:
Brett Cannon 2012-04-20 16:29:39 -04:00
parent 1b5123aae5
commit bbdc9cd3d2

View 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):