summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_tcl.py
diff options
context:
space:
mode:
authorHirokazu Yamamoto <ocean-city@m2.ccsnet.ne.jp>2010-09-23 15:28:35 (GMT)
committerHirokazu Yamamoto <ocean-city@m2.ccsnet.ne.jp>2010-09-23 15:28:35 (GMT)
commitdda7fdf1947453dc4c7b167c75b111b81e4b881e (patch)
treee188fc16df78941484b85dd9149c189760de35ab /Lib/test/test_tcl.py
parentb3b390d7b39563d03e9ad28e348a04c705c3db9d (diff)
downloadcpython-dda7fdf1947453dc4c7b167c75b111b81e4b881e.zip
cpython-dda7fdf1947453dc4c7b167c75b111b81e4b881e.tar.gz
cpython-dda7fdf1947453dc4c7b167c75b111b81e4b881e.tar.bz2
Skip estLoadWithUNC when UNC is not available.
Diffstat (limited to 'Lib/test/test_tcl.py')
-rw-r--r--Lib/test/test_tcl.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/Lib/test/test_tcl.py b/Lib/test/test_tcl.py
index f2a7768..d86246c 100644
--- a/Lib/test/test_tcl.py
+++ b/Lib/test/test_tcl.py
@@ -1,6 +1,7 @@
#!/usr/bin/env python3
import unittest
+import sys
import os
from test import support
@@ -127,21 +128,20 @@ class TclTest(unittest.TestCase):
tcl = self.interp
self.assertRaises(TclError,tcl.eval,'package require DNE')
+ @unittest.skipUnless(sys.platform == 'win32', 'Requires Windows')
def testLoadWithUNC(self):
- import sys
- if sys.platform != 'win32':
- return
-
# Build a UNC path from the regular path.
# Something like
# \\%COMPUTERNAME%\c$\python27\python.exe
fullname = os.path.abspath(sys.executable)
if fullname[1] != ':':
- return
+ raise unittest.SkipTest('Absolute path should have drive part')
unc_name = r'\\%s\%s$\%s' % (os.environ['COMPUTERNAME'],
fullname[0],
fullname[3:])
+ if not os.path.exists(unc_name):
+ raise unittest.SkipTest('Cannot connect to UNC Path')
with support.EnvironmentVarGuard() as env:
env.unset("TCL_LIBRARY")