Fix test failure for test_tcl on OS/X and Windows if a

version of Tcl other than ActiveTcl is installed (ActiveTcl
included TclX, other Tcl distros didn't).

I'm removing the package loading test because it's hard to
come up with a package that is guaranteed to be in any Tcl installation.

Special-casing darwin and windows is ok since that leaves the
only Tk platform (X) which the test was trying to address.
This commit is contained in:
David Ascher 2004-03-26 15:10:25 +00:00
parent 01ab279056
commit 1c5701d36c
1 changed files with 1 additions and 7 deletions

View File

@ -111,12 +111,6 @@ def testEvalFileException(self):
pass
self.assertRaises(TclError,tcl.evalfile,filename)
def testPackageRequire(self):
tcl = self.interp
tcl.eval('package require Tclx')
tcl.eval('keylset a b.c 1')
self.assertEqual(tcl.eval('keylget a b.c'),'1')
def testPackageRequireException(self):
tcl = self.interp
self.assertRaises(TclError,tcl.eval,'package require DNE')
@ -135,7 +129,7 @@ def testLoadTkFailure(self):
import os
old_display = None
import sys
if sys.platform.startswith('win'):
if sys.platform.startswith('win') or sys.platform.startswith('darwin'):
return # no failure possible on windows?
if 'DISPLAY' in os.environ:
old_display = os.environ['DISPLAY']