import failure in plugin-info during selftest

Bug #627438 reported by Parth Malwankar
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Bazaar
Fix Released
Critical
John A Meinel
Bazaar PQM Plugin
Invalid
Undecided
Unassigned
bzr plugin info
Invalid
Undecided
Unassigned

Bug Description

This is with trunk revno 5399

[601749-status-options-show]% ./bzr selftest status
bzr: ERROR: exceptions.ImportError: cannot import name TestLoader

Traceback (most recent call last):
  File "/storage/parth/src/bzr.dev/601749-status-options-show/bzrlib/commands.py", line 912, in exception_to_return_code
    return the_callable(*args, **kwargs)
  File "/storage/parth/src/bzr.dev/601749-status-options-show/bzrlib/commands.py", line 1112, in run_bzr
    ret = run(*run_argv)
  File "/storage/parth/src/bzr.dev/601749-status-options-show/bzrlib/commands.py", line 690, in run_argv_aliases
    return self.run(**all_cmd_args)
  File "/storage/parth/src/bzr.dev/601749-status-options-show/bzrlib/commands.py", line 705, in run
    return self._operation.run_simple(*args, **kwargs)
  File "/storage/parth/src/bzr.dev/601749-status-options-show/bzrlib/cleanup.py", line 135, in run_simple
    self.cleanups, self.func, *args, **kwargs)
  File "/storage/parth/src/bzr.dev/601749-status-options-show/bzrlib/cleanup.py", line 165, in _do_with_cleanups
    result = func(*args, **kwargs)
  File "/storage/parth/src/bzr.dev/601749-status-options-show/bzrlib/builtins.py", line 3625, in run
    result = tests.selftest(**selftest_kwargs)
  File "/storage/parth/src/bzr.dev/601749-status-options-show/bzrlib/tests/__init__.py", line 3469, in selftest
    suite = test_suite(keep_only, starting_with)
  File "/storage/parth/src/bzr.dev/601749-status-options-show/bzrlib/tests/__init__.py", line 3943, in test_suite
    plugin_suite = plugin.test_suite()
  File "/storage/parth/src/bzr.dev/601749-status-options-show/bzrlib/plugin.py", line 506, in test_suite
    return self.module.test_suite()
  File "/home/parthm/.bazaar/plugins/plugin_info/__init__.py", line 50, in test_suite
    from bzrlib.tests import TestLoader
ImportError: cannot import name TestLoader

Related branches

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

I ran into this the other day in bzr-pqm as well.

We now use "TestUtil.TestLoader' in bzrlib/tests/__init__.py

However, given that we have 'TestCase' explicitly exposed in tests, I think it is reasonable to have TestLoader also exposed. While switching the plugins to use the 'def load_tests(... loader ...)' syntax will give them a loader so they don't have to provide their own, it still seems reasonable to keep the base test infrastructure classes available in 'bzrlib.tests.*'.

Though that is certainly just my opinion.

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

This was breaking plugins trying to run the test suite, so I'm introducing a patch now.

Changed in bzr:
assignee: nobody → John A Meinel (jameinel)
importance: Undecided → Critical
status: New → In Progress
John A Meinel (jameinel)
Changed in bzr:
milestone: none → 2.3b1
status: In Progress → Fix Released
Revision history for this message
John A Meinel (jameinel) wrote :

We just fixed bzr to still have these attributes.

Changed in bzr-pqm:
status: New → Invalid
Changed in bzr-plugin-info:
status: New → Invalid
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.