[Pydev-cvs] org.python.pydev/PySrc/ThirdParty/logilab/pylint/test fulltest.sh,NONE,1.1 func_test_sam
Brought to you by:
fabioz
From: Fabio Z. <fa...@us...> - 2005-02-16 16:46:25
|
Update of /cvsroot/pydev/org.python.pydev/PySrc/ThirdParty/logilab/pylint/test In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7532/PySrc/ThirdParty/logilab/pylint/test Modified Files: func_test_sample_config.py test_format.py test_indirectInterface.py unittest_lint.py test_encoding.py smoketest.py unittest_checkers_utils.py func_test.py test_import_graph.py Added Files: fulltest.sh Log Message: New pylint version --- NEW FILE: fulltest.sh --- #!/bin/sh #PYVER= for ver in "2.2" "2.3" "2.4"; do echo "@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@" echo `python$ver -V` echo "^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^" python$ver runtests.py echo "^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^" echo -OO python$ver -OO runtests.py done Index: func_test.py =================================================================== RCS file: /cvsroot/pydev/org.python.pydev/PySrc/ThirdParty/logilab/pylint/test/func_test.py,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** func_test.py 21 Jan 2005 17:46:21 -0000 1.1 --- func_test.py 16 Feb 2005 16:45:43 -0000 1.2 *************** *** 135,141 **** ## tests.append(LintTestSubclass) # test all features are tested :) tests.append(TestTests) ! return tests --- 135,149 ---- ## tests.append(LintTestSubclass) + class LintBuiltinModuleTest(LintTest): + output = 'messages/builtin_module.txt' + module = 'sys' + def test_functionality(self): + self._test(['sys']) + + tests.append(LintBuiltinModuleTest) + # test all features are tested :) tests.append(TestTests) ! return tests Index: unittest_lint.py =================================================================== RCS file: /cvsroot/pydev/org.python.pydev/PySrc/ThirdParty/logilab/pylint/test/unittest_lint.py,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** unittest_lint.py 21 Jan 2005 17:46:21 -0000 1.1 --- unittest_lint.py 16 Feb 2005 16:45:43 -0000 1.2 *************** *** 20,23 **** --- 20,25 ---- import sys import os + import tempfile + from os.path import join from cStringIO import StringIO *************** *** 37,41 **** 'E0501', 'E0503', 'F0002', 'F0203']) ! class GetNoteMessageTC(unittest.TestCase): def test(self): --- 39,48 ---- 'E0501', 'E0503', 'F0002', 'F0203']) ! try: ! optimized = True ! raise AssertionError ! except AssertionError: ! optimized = False ! class GetNoteMessageTC(unittest.TestCase): def test(self): *************** *** 45,51 **** self.assertNotEquals(msg, note_msg) msg = note_msg ! self.assertRaises(AssertionError, get_note_message, 11) ! ! class RunTC(unittest.TestCase): --- 52,58 ---- self.assertNotEquals(msg, note_msg) msg = note_msg ! if optimized: ! self.assertRaises(AssertionError, get_note_message, 11) ! class RunTC(unittest.TestCase): *************** *** 67,70 **** --- 74,78 ---- self.linter = PyLinter() self.linter.disable_message_category('I') + self.linter.config.persistent = 0 # register checkers checkers.initialize(self.linter) *************** *** 80,84 **** msg = self.linter.get_message_help('F0001') expected = 'F0001:\n Used when an error occured preventing the analyzing of a module (unable to\n find it for instance). This message belongs to the master checker.' ! self.assertEquals(msg, expected) self.assertRaises(UnknownMessage, self.linter.get_message_help, 'YB12') --- 88,92 ---- msg = self.linter.get_message_help('F0001') expected = 'F0001:\n Used when an error occured preventing the analyzing of a module (unable to\n find it for instance). This message belongs to the master checker.' ! self.assertEquals(' '.join(msg.splitlines()), ' '.join(expected.splitlines())) self.assertRaises(UnknownMessage, self.linter.get_message_help, 'YB12') *************** *** 131,140 **** self.linter.config.files_output = True try: ! self.linter.check('cStringIO') ! self.assert_(os.path.exists('pylint_cStringIO.txt')) self.assert_(os.path.exists('pylint_global.txt')) finally: try: ! os.remove('pylint_cStringIO.txt') os.remove('pylint_global.txt') except: --- 139,148 ---- self.linter.config.files_output = True try: ! self.linter.check('StringIO') ! self.assert_(os.path.exists('pylint_StringIO.txt')) self.assert_(os.path.exists('pylint_global.txt')) finally: try: ! os.remove('pylint_StringIO.txt') os.remove('pylint_global.txt') except: *************** *** 160,183 **** expected = os.path.join(uhome, '.pylint.d') self.assertEquals(config.PYLINT_HOME, expected) ! ! os.environ['PYLINTHOME'] = '/tmp/.pylint.d' try: ! reload(config) ! self.assertEquals(config.PYLINT_HOME, '/tmp/.pylint.d') ! finally: try: ! os.remove('/tmp/.pylint.d') ! except: ! pass def test_pylintrc(self): ! self.assertEquals(config.PYLINTRC, None) ! os.environ['PYLINTRC'] = '/tmp/.pylintrc' ! reload(config) ! self.assertEquals(config.PYLINTRC, None) ! os.environ['PYLINTRC'] = '/tmp' ! reload(config) ! self.assertEquals(config.PYLINTRC, '/tmp') ! if __name__ == '__main__': --- 168,197 ---- expected = os.path.join(uhome, '.pylint.d') self.assertEquals(config.PYLINT_HOME, expected) ! try: ! pylintd = join(tempfile.gettempdir(), '.pylint.d') ! os.environ['PYLINTHOME'] = pylintd try: ! reload(config) ! self.assertEquals(config.PYLINT_HOME, pylintd) ! finally: ! try: ! os.remove(pylintd) ! except: ! pass ! finally: ! del os.environ['PYLINTHOME'] def test_pylintrc(self): ! try: ! self.assertEquals(config.PYLINTRC, None) ! os.environ['PYLINTRC'] = join(tempfile.gettempdir(), '.pylintrc') ! reload(config) ! self.assertEquals(config.PYLINTRC, None) ! os.environ['PYLINTRC'] = '.' ! reload(config) ! self.assertEquals(config.PYLINTRC, '.') ! finally: ! del os.environ['PYLINTRC'] if __name__ == '__main__': Index: test_import_graph.py =================================================================== RCS file: /cvsroot/pydev/org.python.pydev/PySrc/ThirdParty/logilab/pylint/test/test_import_graph.py,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** test_import_graph.py 21 Jan 2005 17:46:21 -0000 1.1 --- test_import_graph.py 16 Feb 2005 16:45:43 -0000 1.2 *************** *** 43,46 **** --- 43,47 ---- def test_checker_dep_graphs(self): l = self.linter + l.global_set_option('persistent', False) l.global_set_option('enable-imports', True) l.global_set_option('import-graph', 'import.dot') |