pythoscope destroys existing tests when run against pydoc.py

Bug #462849 reported by ryan.freckleton on 2009-10-28
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Pythoscope
High
Michal Kwiatkowski

Bug Description

Running

    pythoscope pydoc.py

in the python standard library causes all the pre-existing tests in test/test_pydoc to be destroyed. This may be because there are a large number of helper functions and variables declared before the unit test code.

This bug should be associated be associated with the 0.5.0 release unless it turns out to be very easy to fix.

Related branches

Changed in pythoscope:
importance: Undecided → High
status: New → Confirmed
milestone: none → 0.5-usability
Michal Kwiatkowski (ruby) wrote :

The reason that pythoscope overwrites test/test_pydoc.py is because it hasn't been properly inspected. If you turn on --verbose flag you'll see:

    135709.880 inspector:36 INFO: Inspecting module test/test_pydoc.py.
    135709.966 astbuilder:84 DEBUG: Had problems parsing:

Also notice that Pythoscope adds a test to the test/test_iterlen.py file and there everything is fine.

This is still an ugly bug - Pythoscope should *never* touch and uninspected module.

I don't want to delay 0.4.2 any more, but I will probably make 0.4.3 release for this fix alone. Thank you for the report!

Changed in pythoscope:
milestone: 0.5-usability → 0.4.3

Tracked it down. astbuilder can't handle the (new in python 2.7) multiple context managers with one statement described here [http://docs.python.org/dev/whatsnew/2.7.html#other-language-changes]

So it wont be a major problem until 2.7.

I'm marking this defect as "Invalid" to reflect that.

Maybe testing pythoscope against unreleased python code wasn't the best idea :)

Changed in pythoscope:
status: Confirmed → Invalid
Michal Kwiatkowski (ruby) wrote :

Thanks for the information. I hope they will update lib2to3 with the new syntax at some point before releasing Python 2.7.

Pythoscope still does the wrong thing by writing over a module it couldn't inspect, and I want to fix that in the next release, so I'm reopening this bug.

Changed in pythoscope:
status: Invalid → Confirmed
Michal Kwiatkowski (ruby) wrote :

Fixed in trunk r318.

Changed in pythoscope:
assignee: nobody → Michal Kwiatkowski (ruby)
status: Confirmed → Fix Committed
Changed in pythoscope:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers