test_transport_sftp backtraces if paramiko isn't present

Bug #461149 reported by Ingmar Vanhassel on 2009-10-26
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Bazaar
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

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>

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!

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!
--

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) on 2009-11-02
Changed in bzr:
milestone: none → 2.0.2
status: New → Fix Released
Martin Pool (mbp) on 2009-11-25
Changed in bzr:
importance: Undecided → Medium
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers