Storm 0.13 test failure with Python 2.6

Bug #310520 reported by James Henstridge
2
Affects Status Importance Assigned to Milestone
Storm
Fix Released
Undecided
James Henstridge
storm (Fedora)
Fix Released
Medium

Bug Description

One of the Fedora guys reported a test failure when building Storm 0.13 against Python 2.6. A build log follows:

  http://koji.fedoraproject.org/koji/getfile?taskID=1015672&name=build.log

The test output is a little messed up due to us outputing on both stdout and stderr, but the problem appears to be in one of the tracer tests.

The bug has been reported downstream here:

  https://bugzilla.redhat.com/show_bug.cgi?id=477591

Related branches

Revision history for this message
In , Alex (alex-redhat-bugs) wrote :

Test suite currently fails:

https://koji.fedoraproject.org/koji/taskinfo?taskID=1015672

Version-Release number of selected component (if applicable): python-storm-0.13-3

I have temporarily disabled %check in the .spec and rebuilt to fix the broken deps in rawhide. Opening this bug to remind me and the main maintainer to come back and fix it later.

Changed in storm:
status: Unknown → Confirmed
Revision history for this message
In , Alex (alex-redhat-bugs) wrote :

Upstream thinks it's relatively safe to disable for the moment and have opened up a bug to track this:

https://launchpad.net/bugs/310520

Revision history for this message
James Henstridge (jamesh) wrote :

The end of the log where the test fails is:

[tests/tracer.py]
Traceback (most recent call last):
  File "./test", line 183, in <module>
    runner_func()
  File "./test", line 147, in test_with_unittest
    result = runner.run(test)
  File "/usr/lib64/python2.6/unittest.py", line 753, in run
    test(result)
  File "/usr/lib64/python2.6/unittest.py", line 464, in __call__
    return self.run(*args, **kwds)
  File "/usr/lib64/python2.6/unittest.py", line 460, in run
    test(result)
  File "/usr/lib64/python2.6/unittest.py", line 464, in __call__
    return self.run(*args, **kwds)
  File "/usr/lib64/python2.6/unittest.py", line 460, in run
    test(result)
  File "/usr/lib64/python2.6/unittest.py", line 300, in __call__
    return self.run(*args, **kwds)
  File "/builddir/build/BUILD/storm-0.13/tests/mocker.py", line 134, in run_wrapper
    return run_method(*args, **kwargs)
  File "/builddir/build/BUILD/storm-0.13/tests/helper.py", line 71, in run
    unittest.TestCase.run(self, result)
  File "/usr/lib64/python2.6/unittest.py", line 295, in run
    if ok: result.addSuccess(self)
  File "/usr/lib64/python2.6/unittest.py", line 703, in addSuccess
    self.stream.flush()
  File "/builddir/build/BUILD/storm-0.13/tests/mocker.py", line 1066, in __call__
    return self.__mocker_act__("call", args, kwargs)
  File "/builddir/build/BUILD/storm-0.13/tests/mocker.py", line 1046, in __mocker_act__
    raise AssertionError(os.linesep.join(message))
AssertionError: [Mocker] Unmet expectation:
=> sys.stderr.flush()
 - Performed more times than expected.
error: Bad exit status from /var/tmp/rpm-tmp.Wzugl2 (%check)

It isn't clear which test exactly is failing. Apparently the problem did not occur with older versions of Python (only occurring after rebuilding for 2.6).

Revision history for this message
James Henstridge (jamesh) wrote :

So, the problem tests here are the DebugTracerTest tests from tests/tracer.py.

Python 2.6 adds a call to self.stream.flush() in addSuccess when running with the minimal dots output, where "self.stream" is stderr. The problem tests replace stderr using mocker and check to see that it is flushed only once.

The tests should probably be changed to do the following:

 1. DebugTracer sets _stream to sys.stderr when constructed with no arguments.
 2. DebugTracer sets _stream to its first argument when constructed with one argument.
 3. change the remaining tests to configure DebugTracer to act on a mocked file object.

When running the tests with --verbose (which avoids the bugs in the tracer tests), I ran into a number of failures in the doctests to do with different representations for classes and instances. For example:

  **********************************************************************
  File "./tests/infoheritance.txt", line 204, in infoheritance.txt
  Failed example:
      [type(person.info) for person in store.find(Person).order_by(Person.name)]
  Expected:
      [<class 'SecretAgent'>, <class 'Teacher'>]
  Got:
      [<class '__main__.SecretAgent'>, <class '__main__.Teacher'>]
  **********************************************************************

And:

  **********************************************************************
  File "./tests/tutorial.txt", line 85, in tutorial.txt
  Failed example:
      store.add(joe)
  Expected:
      <Person object at 0x...>
  Got:
      <__main__.Person object at 0x32f3ed0>
  **********************************************************************

Revision history for this message
In , James (james-redhat-bugs) wrote :

I've tracked down the cause of this bug and added a description of it in the upstream tracker. I'll look at getting it fixed for the next release (0.15).

Revision history for this message
In , Michel (michel-redhat-bugs) wrote :

James: if you check in a fix before 0.15 that can be easily backported, do let us know too. Thanks.

Changed in storm:
status: Confirmed → In Progress
Revision history for this message
James Henstridge (jamesh) wrote :

Fix committed to trunk as r295

Changed in storm:
assignee: nobody → jamesh
status: New → Fix Committed
Revision history for this message
In , James (james-redhat-bugs) wrote :

The change has been committed to trunk in r295, so will be included in 0.15. Here's a link to the changes:

  http://bazaar.launchpad.net/~storm/storm/trunk/revision/295

Changed in storm:
milestone: none → 0.15
Revision history for this message
In , Bug (bug-redhat-bugs) wrote :

This bug appears to have been reported against 'rawhide' during the Fedora 11 development cycle.
Changing version to '11'.

More information and reason for this action is here:
http://fedoraproject.org/wiki/BugZappers/HouseKeeping

Jamu Kakar (jkakar)
Changed in storm:
status: Fix Committed → Fix Released
Revision history for this message
In , Michel (michel-redhat-bugs) wrote :

With 0.15, the tests now run successfully on F-11 and above, but SQLite tests are failing on F-10 and EL-5.

Revision history for this message
In , Fedora (fedora-redhat-bugs) wrote :

python-storm-0.15-2.fc11 has been submitted as an update for Fedora 11.
http://admin.fedoraproject.org/updates/python-storm-0.15-2.fc11

Revision history for this message
In , Fedora (fedora-redhat-bugs) wrote :

python-storm-0.15-2.fc11 has been pushed to the Fedora 11 testing repository. If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with
 su -c 'yum --enablerepo=updates-testing update python-storm'. You can provide feedback for this update here: http://admin.fedoraproject.org/updates/F11/FEDORA-2009-9202

Changed in storm (Fedora):
status: In Progress → Fix Committed
Revision history for this message
In , Fedora (fedora-redhat-bugs) wrote :

python-storm-0.15-2.fc11 has been pushed to the Fedora 11 stable repository. If problems still persist, please make note of it in this bug report.

Changed in storm (Fedora):
status: Fix Committed → Fix Released
Changed in storm (Fedora):
importance: Unknown → Medium
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

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