*Trying*, as hard as possible, to be nice to Windows.

This commit is contained in:
Jeremy Fincher 2003-10-05 21:37:29 +00:00
parent b1977a1b29
commit 9e0ab0e73b
2 changed files with 6 additions and 2 deletions

View File

@ -53,7 +53,10 @@ import utils
import privmsgs
import callbacks
pythonPath = map(os.path.dirname, [os.__file__, math.__file__])
L = [os.__file__]
if hasattr(math, '__file__'):
L.append(math.__file__)
pythonPath = map(os.path.dirname, L)
def configure(onStart, afterConnect, advanced):
# This will be called by setup.py to configure this module. onStart and

View File

@ -42,7 +42,8 @@ class PythonTestCase(PluginTestCase, PluginDocumentation):
if os.name == 'posix':
self.assertNotRegexp('pydoc crypt.crypt', 'NameError')
self.assertNotError('pydoc crypt.crypt')
self.assertNotError('pydoc math.sin')
# .so modules don't have an __file__ in Windows.
self.assertNotError('pydoc math.sin')
self.assertNotError('pydoc string.translate')
self.assertNotError('pydoc fnmatch.fnmatch')
self.assertNotError('pydoc socket.socket')