test_transport_sftp backtraces if paramiko isn't present

Bug #461149 reported by Ingmar Vanhassel
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Bazaar
Fix Released
Medium
Matt Nordhoff

Bug Description

I'm making Exherbo packages for bzr 2.0.1, and while running bzr I came across this test failure.
It happens when I run bzr tests without having paramiko installed. Python version is 2.6.2
It's reproducable for me, the bug is present in bzr 2.0.0 too, this worked for 1.16.1 as far as I can remember.

ERROR: test_transport_sftp (bzrlib.tests.test_selftest.TestSelftest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/var/tmp/paludis/build/dev-scm-bzr-2.0.1/work/bzr-2.0.1/bzrlib/tests/test_selftest.py", line 1880, in test_transport_sftp
    except ParamikoNotPresent:
NameError: global name 'ParamikoNotPresent' is not defined

----------------------------------------------------------------------
Ran 22132 tests in 3956.896s

FAILED (errors=1, known_failure_count=33)

Related branches

Revision history for this message
Matt Nordhoff (mnordhoff) wrote : Re: [Bug 461149] [NEW] test_transport_sftp backtraces if paramiko isn't present

I can confirm this in 2.0. If you change the line to this it will work:

        except errors.ParamikoNotPresent:

It's been fixed in bzr.dev:

<http://bazaar.launchpad.net/~bzr-pqm/bzr/bzr.dev/revision/4645.2.1>

Revision history for this message
Ingmar Vanhassel (ingmar) wrote :

Thanks for the quick response.

When I apply the patch below I get

"""
ERROR: test_transport_sftp (bzrlib.tests.test_selftest.TestSelftest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/var/tmp/paludis/build/dev-scm-bzr-2.0.1/work/bzr-2.0.1/bzrlib/tests/test_selftest.py", line 1881, in test_transport_sftp
    raise TestSkipped("Paramiko not present")
NameError: global name 'TestSkipped' is not defined
"""

Will these bugfixes be fixed wit the bzr-2.0.2 release?

Thanks again!

Revision history for this message
Matt Nordhoff (mnordhoff) wrote : Re: [Bug 461149] Re: test_transport_sftp backtraces if paramiko isn't present

Ingmar Vanhassel wrote:
> Thanks for the quick response.
>
> When I apply the patch below I get
>
> """
> ERROR: test_transport_sftp (bzrlib.tests.test_selftest.TestSelftest)
> ----------------------------------------------------------------------
> Traceback (most recent call last):
> File "/var/tmp/paludis/build/dev-scm-bzr-2.0.1/work/bzr-2.0.1/bzrlib/tests/test_selftest.py", line 1881, in test_transport_sftp
> raise TestSkipped("Paramiko not present")
> NameError: global name 'TestSkipped' is not defined
> """

Argh. That was fixed in bzr.dev too. Change it to:

            raise tests.TestSkipped("Paramiko not present")

> Will these bugfixes be fixed wit the bzr-2.0.2 release?

No idea. That's not my department.

> Thanks again!
--

Revision history for this message
John A Meinel (jameinel) wrote :

This looks like something that would be perfectly acceptable as a patch to the 2.0.x series. It just requires someone to actually care to submit one.

Changed in bzr:
assignee: nobody → Matt Nordhoff (mnordhoff)
John A Meinel (jameinel)
Changed in bzr:
milestone: none → 2.0.2
status: New → Fix Released
Martin Pool (mbp)
Changed in bzr:
importance: Undecided → 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.