~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/plugins/launchpad/__init__.py

merge shell-like-tests into description resolving conflicts

Show diffs side-by-side

added added

removed removed

Lines of Context:
170
170
        """Yield possible external locations for the branch at 'location'."""
171
171
        yield location
172
172
        try:
173
 
            branch = _mod_branch.Branch.open(location)
 
173
            branch = _mod_branch.Branch.open_containing(location)[0]
174
174
        except NotBranchError:
175
175
            return
176
176
        branch_url = branch.get_public_branch()
262
262
_register_directory()
263
263
 
264
264
 
265
 
def test_suite():
266
 
    """Called by bzrlib to fetch tests for this plugin"""
267
 
    from unittest import TestSuite, TestLoader
268
 
    from bzrlib.plugins.launchpad import (
269
 
        test_account,
270
 
        test_lp_directory,
271
 
        test_lp_login,
272
 
        test_lp_open,
273
 
        test_lp_service,
274
 
        test_register,
275
 
        )
 
265
def load_tests(basic_tests, module, loader):
 
266
    testmod_names = [
 
267
        'test_account',
 
268
        'test_register',
 
269
        'test_lp_directory',
 
270
        'test_lp_login',
 
271
        'test_lp_open',
 
272
        'test_lp_service',
 
273
        ]
 
274
    basic_tests.addTest(loader.loadTestsFromModuleNames(
 
275
            ["%s.%s" % (__name__, tmn) for tmn in testmod_names]))
 
276
    return basic_tests
276
277
 
277
 
    loader = TestLoader()
278
 
    suite = TestSuite()
279
 
    for module in [
280
 
        test_account,
281
 
        test_register,
282
 
        test_lp_directory,
283
 
        test_lp_login,
284
 
        test_lp_open,
285
 
        test_lp_service,
286
 
        ]:
287
 
        suite.addTests(loader.loadTestsFromModule(module))
288
 
    return suite
289
278
 
290
279
_launchpad_help = """Integration with Launchpad.net
291
280