pythoscope generate crashes with AttributeError: 'TestModule' object has no attribute 'testable_objects'
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Pythoscope |
Fix Released
|
Medium
|
Michal Kwiatkowski |
Bug Description
I have a collection of .py files that I want to be inspected by pythoscope, and unit test modules to be generated. Here's what I did (the test_blah.py modules are ones that I had already written):
[root@storm deploy]# ls
deploy_activemq.py deploy_
deploy_cdp_app.py deploy_cdp_java.py install_log4j.sh show_slave_
deploy_
deploy_
[root@storm deploy]# pythoscope inspect *.py
[root@storm deploy]# pythoscope generate -t nose *.py
Traceback (most recent call last):
File "/usr/bin/
sys.exit(
File "/usr/lib/
generate(
File "/usr/lib/
add_
File "/usr/lib/
generator.
File "/usr/lib/
self.
File "/usr/lib/
test_cases = self._generate_
File "/usr/lib/
[self.
AttributeError: 'TestModule' object has no attribute 'testable_objects'
Basically the problem is that you have test modules there and by calling "pythoscope generate -t nose *.py" you try to generate test cases for them. If you exclude those test modules from call to generate Pythoscope won't crash.
But of course Pythoscope should handle that and just ignore the test modules, so I'm confirming the bug.