Error running tests for plugins . . .

Vincent Ladeuil v.ladeuil+lp at free.fr
Sat Jul 4 16:13:07 BST 2009


>>>>> "Russel" == Russel Winder <russel.winder at concertant.com> writes:

    Russel> I wanted to run the tests for the installed bzrtools
    Russel> plugin.  I had thought "bzr selftest bzrtools" might
    Russel> do teh trick.  However, this results in the
    Russel> following.  Am I just doing something stupid, or is
    Russel> this a Bazaar bug?

Not being omniscient has nothing to do with being stupid :)

  bzr selftest bzrtools

loads all plugins, all tests and only runs test whose ID match 'bzrtools'.

In contrast:

  bzr selftest --starting-with bp.bzrtools

run only the tests whose ID begin with bzrlib.plugins.bzrtools[0].

'bp' is a shortcut for bzrlib.plugins, you'll find the list of
all known prefixes in bzrlib/tests/__init__.py:

  # Obvious highest levels prefixes, feel free to add your own via a plugin
  test_prefix_alias_registry.register('bd', 'bzrlib.doc')
  test_prefix_alias_registry.register('bu', 'bzrlib.utils')
  test_prefix_alias_registry.register('bt', 'bzrlib.tests')
  test_prefix_alias_registry.register('bb', 'bzrlib.tests.blackbox')
  test_prefix_alias_registry.register('bp', 'bzrlib.plugins')


<snip/>

    Russel>   File "/usr/lib/python2.6/dist-packages/bzrlib/plugins/upload/tests/test_upload.py", line 44, in <module>
    Russel>     test_transport_implementations.TransportTestProviderAdapter):
    Russel> AttributeError: 'module' object has no attribute 'TransportTestProviderAdapter'

Bad upload plugin ! Using deprecated test classes ! Oh wait, the
plugin has been updated long ago, time to update your copy !

And nag that plugin maintainer to release a new version !

    Vincent

[0]:It also avoid loading the tests whose ID doesn't begin with
the specified string, which speeds up selftest starting.



More information about the bazaar mailing list