Re: [Pydev-users] Renaming test case file causes major failure
Brought to you by:
fabioz
From: Fabio Z. <fa...@gm...> - 2006-04-26 10:57:21
|
Hi Barry, The message you're seeing is from code-analysis, and it means that you have a number of tokens from a wild import that you're not using. You can correct it by not using a wild import and just using the needed tokens or by using (take a look at http://www.fabioz.com/pydev/manual_adv_code_analysis.html for details on code-analysis). As for the tests not running that's strange, couldn't reproduce that behaviour here... Actually, scratch that... I've found it, the reason is that you're renaming it to the same name of the parent package, so, you can rename the test for anything but the same name of the parent package... That's because your structure becomes encodetests/ __init__.py encodetests.py And the unit-testing module tries to import the module encodetests.py and ends up with the module encodetests.__init__.py, where it cannot find any unit-test... So, that's a bug (if you could report it in the tracker it would be nice...). I'll have to think about it some more to see how to fix it. Cheers, Fabio On 4/25/06, Carroll, Barry <Bar...@ps...> wrote: > > Greetings: > > > > The top level module in my encodetests package is named testsymgen.py. > When I run this module as a Python unit-test, it runs correctly, executin= g > some 160 tests from five submodules. > > > > When I rename the file to encodetests.py, however, and run it, it runs > zero tests. In the problem pane, each import line of the top level modul= e > generates this warning: > > > > Severity Description Resource In > Folder Location > > 1 Unused in wild import:=85 encodetests.py > symgen/encodetests line 33 > > > > Can anyone tell me why renaming the module should cause this behavior and > what I can do to correct it? > > > > Regards, > > > > Barry > > bar...@ps... > > 541-302-1107 > > *________________________* > > *We who cut mere stones must always be envisioning cathedrals.*** > > *=97Quarry worker's creed*** > > > |