Changes to be nice to Windows.

This commit is contained in:
Jeremy Fincher 2003-10-05 20:05:53 +00:00
parent d3a9a46d99
commit 498682d830
3 changed files with 27 additions and 21 deletions

View File

@ -39,7 +39,7 @@ import plugins
import os import os
import imp import imp
import sys import sys
import crypt import math
import random import random
import string import string
@ -53,7 +53,7 @@ import utils
import privmsgs import privmsgs
import callbacks import callbacks
pythonPath = map(os.path.dirname, [os.__file__, crypt.__file__]) pythonPath = map(os.path.dirname, [os.__file__, math.__file__])
def configure(onStart, afterConnect, advanced): def configure(onStart, afterConnect, advanced):
# This will be called by setup.py to configure this module. onStart and # This will be called by setup.py to configure this module. onStart and

View File

@ -31,12 +31,15 @@
from test import * from test import *
import os
class PythonTestCase(PluginTestCase, PluginDocumentation): class PythonTestCase(PluginTestCase, PluginDocumentation):
plugins = ('Python',) plugins = ('Python',)
def testPydoc(self): def testPydoc(self):
self.assertError('pydoc foobar') self.assertError('pydoc foobar')
self.assertError('pydoc assert') self.assertError('pydoc assert')
self.assertNotError('pydoc str') self.assertNotError('pydoc str')
if os.name == 'posix':
self.assertNotRegexp('pydoc crypt.crypt', 'NameError') self.assertNotRegexp('pydoc crypt.crypt', 'NameError')
self.assertNotError('pydoc crypt.crypt') self.assertNotError('pydoc crypt.crypt')
self.assertNotError('pydoc math.sin') self.assertNotError('pydoc math.sin')

View File

@ -31,11 +31,14 @@
from test import * from test import *
import os
if os.name == 'posix':
class UnixTestCase(PluginTestCase, PluginDocumentation): class UnixTestCase(PluginTestCase, PluginDocumentation):
plugins = ('Unix',) plugins = ('Unix',)
def testSpell(self): def testSpell(self):
self.assertRegexp('spell Strike', 'correctly') self.assertRegexp('spell Strike', 'correctly')
self.assertRegexp('spell asdlkfjasdlfkjsdalfkjasdflkasjdflskdfjlsd', self.assertRegexp('spell asdlkjsdalfkjasdflkasjdflskdfjlsd',
'not find') 'not find')
self.assertNotError('spell Strizzike') self.assertNotError('spell Strizzike')
self.assertError('spell foo bar baz') self.assertError('spell foo bar baz')