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 imp
import sys
import crypt
import math
import random
import string
@ -53,7 +53,7 @@ import utils
import privmsgs
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):
# This will be called by setup.py to configure this module. onStart and

View File

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

View File

@ -31,27 +31,30 @@
from test import *
class UnixTestCase(PluginTestCase, PluginDocumentation):
plugins = ('Unix',)
def testSpell(self):
self.assertRegexp('spell Strike', 'correctly')
self.assertRegexp('spell asdlkfjasdlfkjsdalfkjasdflkasjdflskdfjlsd',
'not find')
self.assertNotError('spell Strizzike')
self.assertError('spell foo bar baz')
import os
def testErrno(self):
self.assertRegexp('errno 12', '^ENOMEM')
self.assertRegexp('errno ENOMEM', '#12')
if os.name == 'posix':
class UnixTestCase(PluginTestCase, PluginDocumentation):
plugins = ('Unix',)
def testSpell(self):
self.assertRegexp('spell Strike', 'correctly')
self.assertRegexp('spell asdlkjsdalfkjasdflkasjdflskdfjlsd',
'not find')
self.assertNotError('spell Strizzike')
self.assertError('spell foo bar baz')
def testProgstats(self):
self.assertNotError('progstats')
def testErrno(self):
self.assertRegexp('errno 12', '^ENOMEM')
self.assertRegexp('errno ENOMEM', '#12')
def testCrypt(self):
self.assertNotError('crypt jemfinch')
def testProgstats(self):
self.assertNotError('progstats')
def testFortune(self):
self.assertNotError('fortune')
def testCrypt(self):
self.assertNotError('crypt jemfinch')
def testFortune(self):
self.assertNotError('fortune')