mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-23 19:19:32 +01:00
Changes to be nice to Windows.
This commit is contained in:
parent
d3a9a46d99
commit
498682d830
@ -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
|
||||||
|
@ -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')
|
||||||
|
@ -31,11 +31,14 @@
|
|||||||
|
|
||||||
from test import *
|
from test import *
|
||||||
|
|
||||||
class UnixTestCase(PluginTestCase, PluginDocumentation):
|
import os
|
||||||
|
|
||||||
|
if os.name == 'posix':
|
||||||
|
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')
|
||||||
|
Loading…
Reference in New Issue
Block a user