From: Thomas V. S. <tho...@us...> - 2011-01-18 07:42:39
|
Update of /cvsroot/pychecker/pychecker/test In directory sfp-cvsdas-2.v30.ch3.sourceforge.com:/tmp/cvs-serv28798/test Modified Files: test_internal.py Log Message: * pychecker/pcmodules.py: Allow getting the whole dict, for testing. * test/test_internal.py: Add a test that shows that we are creating bogus modules when doing star imports. Index: test_internal.py =================================================================== RCS file: /cvsroot/pychecker/pychecker/test/test_internal.py,v retrieving revision 1.15 retrieving revision 1.16 diff -u -d -r1.15 -r1.16 --- test_internal.py 17 Jan 2011 21:17:51 -0000 1.15 +++ test_internal.py 18 Jan 2011 07:42:28 -0000 1.16 @@ -152,6 +152,11 @@ # FIXME: why do we have a non-empty stack here ? # self.assertEquals(pcmodule.codes[0].stack, []) + modules = pcmodules._getPCModulesDict() + for (name, moduleDir) in modules.keys(): + self.failIf(name.find('*') > -1, + 'Invalid loaded module name %s' % (name, )) + # check the module from which we are starimporting; # it should have been loaded as a side effect pcmodule = pcmodules.getPCModule("starimportfrom", moduleDir="input") |