setup.py test fails

Bug #348136 reported by Pieter Van Dyck
6
Affects Status Importance Assigned to Milestone
Pythoscope
Fix Released
Medium
Michal Kwiatkowski

Bug Description

Running setup.py test on windows generates a few failures and errors.
Same results for 0.4 and trunk.
See log in attachment for details.

Related branches

Revision history for this message
Pieter Van Dyck (vandyck-pieter) wrote :
Revision history for this message
Michal Kwiatkowski (ruby) wrote :

Thank you for this report. Reminds me I should boot Windows from time to time, if just to test Pythoscope. ;-)

First two failures and the crash at the end are related to the fixture module we use, and may not be Pythoscope errors in itself. Anyway, we should investigate. This is directly related to https://bugs.launchpad.net/pythoscope/+bug/311778

Changed in pythoscope:
importance: Undecided → Medium
milestone: none → 0.4.1-setup-and-teardown-fixes
status: New → Confirmed
Revision history for this message
Pieter Van Dyck (vandyck-pieter) wrote : Re: [Bug 348136] Re: setup.py test fails
  • scope.log Edit (829 bytes, application/octet-stream; name="scope.log")

I fact error 3 looks a lot like the result from trying to run pythoscope a
second time on iTrade (minus the itrade_logging module).
That is: after a project.pickle has been created.

I've attached the log for such attempt to this mail.

For the first 2 errors, it looks like the tmp_fixture_xxx directories were
never created for those cases.

Revision history for this message
Michal Kwiatkowski (ruby) wrote :

Fixes related to different path separator on Windows has been committed to trunk in r260.

There are still 3 test cases failing, and the cause is the fixture module. Since this is a bigger thing, I prepared a blueprint for this change (https://blueprints.launchpad.net/pythoscope/+spec/stop-using-fixture) and I will work on this later this week.

Revision history for this message
Pieter Van Dyck (vandyck-pieter) wrote :

Thanks for the fix.

I agree that the first 2 errors are caused by the fixture module
but I think the 3rd error (pickle) may have a different cause
as it occurs in normal runs as well.

I'll take a closer look later on.

Revision history for this message
Michal Kwiatkowski (ruby) wrote :

You may be right about the pickle error, thanks for pointing that out.

Revision history for this message
Pieter Van Dyck (vandyck-pieter) wrote :

Just to illustrate:

with trunk r263 on windows, using itrade as test project
running pythoscope *.py twice gives the following error

ERROR: Oops, it seems internal Pythoscope error occured. Please file a
bug report at https://bugs.launchpad.net/pythoscope

Traceback (most recent call last):
  File "C:\tools\python25\scripts\pythoscope-script.py", line 8, in <module>
    load_entry_point('pythoscope==0.4', 'console_scripts', 'pythoscope')()
  File "c:\tools\python25\lib\site-packages\pythoscope-0.4-py2.5.egg\pythoscope\__init__.py",
line 187, in main
    generate_tests(args, force, template)
  File "c:\tools\python25\lib\site-packages\pythoscope-0.4-py2.5.egg\pythoscope\__init__.py",
line 114, in generate_tests
    project = Project.from_directory(find_project_directory(modules[0]))
  File "c:\tools\python25\lib\site-packages\pythoscope-0.4-py2.5.egg\pythoscope\store.py",
line 70, in from_directory
    project = cPickle.load(fd)
EOFError

Revision history for this message
Michal Kwiatkowski (ruby) wrote :

Pickle loading error fixed in trunk r264.

Bad file mode was at fault - we used text, while a binary mode should've been used instead.

Revision history for this message
Pieter Van Dyck (vandyck-pieter) wrote :

thanks for the fix

Pieter

Revision history for this message
Michal Kwiatkowski (ruby) wrote :

No problem. Now only the fixture removal remains. :-)

Revision history for this message
Michal Kwiatkowski (ruby) wrote :

Fixes for all issues except 2 failing tests that use fixture were released in 0.4.1.

Changed in pythoscope:
assignee: nobody → ruby
Revision history for this message
Michal Kwiatkowski (ruby) wrote :

All errors fixed in trunk.

"setup.py test" now runs both on linux and windows flawlessly.

Changed in pythoscope:
status: Confirmed → Fix Committed
Revision history for this message
Michal Kwiatkowski (ruby) wrote :

Fix released in Pythoscope 0.4.2.

Changed in pythoscope:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Related questions

Remote bug watches

Bug watches keep track of this bug in other bug trackers.