From: Thomas V. S. <tho...@us...> - 2008-07-29 14:51:49
|
Update of /cvsroot/pychecker/pychecker/test In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14604/test Modified Files: common.py test_module.py test_stdlib.py Log Message: * test/common.py: * test/test_module.py: * test/test_stdlib.py: Switch to mixedCase as Neil prefers. Index: test_module.py =================================================================== RCS file: /cvsroot/pychecker/pychecker/test/test_module.py,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- test_module.py 13 Jul 2008 22:56:12 -0000 1.1 +++ test_module.py 29 Jul 2008 14:51:56 -0000 1.2 @@ -10,10 +10,10 @@ class SameModuleNameTestCase(common.TestCase): ''' - test that modules with the same name do not shadow eachother. + Test that modules with the same name do not shadow eachother. ''' def test_getmodule(self): - self.check_multiple('test_getmodule', [ + self.checkMultiple('test_getmodule', [ 'getmodule/A/C.py', 'getmodule/B/C.py', ]) Index: test_stdlib.py =================================================================== RCS file: /cvsroot/pychecker/pychecker/test/test_stdlib.py,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- test_stdlib.py 12 Jul 2008 10:01:28 -0000 1.2 +++ test_stdlib.py 29 Jul 2008 14:51:56 -0000 1.3 @@ -16,7 +16,7 @@ See http://sourceforge.net/tracker/index.php?func=detail&aid=1564614&group_id=24686&atid=382217 ''' def test_zope_interface(self): - if not common.can_import('zope.interface'): + if not common.canImport('zope.interface'): self.skip = True # FIXME: interpret this self.check('test_zope_interface', '-q') Index: common.py =================================================================== RCS file: /cvsroot/pychecker/pychecker/test/common.py,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- common.py 13 Jul 2008 22:45:54 -0000 1.3 +++ common.py 29 Jul 2008 14:51:56 -0000 1.4 @@ -5,7 +5,7 @@ import commands import unittest -def can_import(module): +def canImport(module): ''' Check if we can import the given module name. @@ -34,7 +34,7 @@ ("\nError while comparing strings:\n" "%s") % (output,)) -def diff_strings(orig, new, desc='input'): +def diffStrings(orig, new, desc='input'): def tolines(s): return [line + '\n' for line in s.split('\n')] @@ -48,9 +48,9 @@ Run pychecker on the given test, located in input/ Will compare to output of the same name in expected/ """ - return self.check_multiple(testname, [testname + '.py'], args) + return self.checkMultiple(testname, [testname + '.py'], args) - def check_multiple(self, testname, checkables, args=''): + def checkMultiple(self, testname, checkables, args=''): """ Run pychecker on the given test, located in input/ Will compare to output of the same name in expected/ @@ -62,7 +62,8 @@ if testdir.startswith(os.getcwd()): testdir = testdir[len(os.getcwd()) + 1:] - pycheckerpy = os.path.join(os.path.dirname(testdir), 'pychecker', 'checker.py') + pycheckerpy = os.path.join(os.path.dirname(testdir), + 'pychecker', 'checker.py') testfiles = [os.path.join(testdir, 'input', c) for c in checkables] cmd = "python -tt %s " \ @@ -83,5 +84,5 @@ expected = open(expectedfile).read() - diff_strings(output, expected, desc=expectedfile) + diffStrings(output, expected, desc=expectedfile) |