~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_registry.py

  • Committer: Max Bowsher
  • Date: 2011-01-11 11:26:48 UTC
  • mto: This revision was merged to the branch mainline in revision 5589.
  • Revision ID: maxb@f2s.com-20110111112648-3lleuo22utyaunfw
Add a consistent header comment to tools/packaging/*.sh

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# Copyright (C) 2006, 2008-2011 Canonical Ltd
 
1
# Copyright (C) 2006, 2008, 2009, 2010 Canonical Ltd
2
2
#
3
3
# This program is free software; you can redistribute it and/or modify
4
4
# it under the terms of the GNU General Public License as published by
338
338
        finally:
339
339
            sys.path.remove(plugin_path)
340
340
 
341
 
    def test_lazy_import_get_module(self):
342
 
        a_registry = registry.Registry()
343
 
        a_registry.register_lazy('obj', "bzrlib.tests.test_registry",
344
 
            'object1')
345
 
        self.assertEquals("bzrlib.tests.test_registry",
346
 
            a_registry._get_module("obj"))
347
 
 
348
 
    def test_normal_get_module(self):
349
 
        class AThing(object):
350
 
            """Something"""
351
 
        a_registry = registry.Registry()
352
 
        a_registry.register("obj", AThing())
353
 
        self.assertEquals("bzrlib.tests.test_registry",
354
 
            a_registry._get_module("obj"))