/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to breezy/tests/test_pyutils.py

  • Committer: Jelmer Vernooij
  • Date: 2017-05-21 18:10:28 UTC
  • mto: This revision was merged to the branch mainline in revision 6623.
  • Revision ID: jelmer@jelmer.uk-20170521181028-zn04pdfw0od9hfj3
Rename brzlib => breezy.

Show diffs side-by-side

added added

removed removed

Lines of Context:
14
14
# along with this program; if not, write to the Free Software
15
15
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
16
16
 
17
 
"""Tests for brzlib.pyutils."""
 
17
"""Tests for breezy.pyutils."""
18
18
 
19
 
from brzlib import (
 
19
from breezy import (
20
20
    branch,
21
21
    tests,
22
22
    )
23
 
from brzlib.pyutils import (
 
23
from breezy.pyutils import (
24
24
    calc_parent_name,
25
25
    get_named_object,
26
26
    )
34
34
        self.assertIs(sys, get_named_object('sys'))
35
35
 
36
36
    def test_dotted_module(self):
37
 
        self.assertIs(branch, get_named_object('brzlib.branch'))
 
37
        self.assertIs(branch, get_named_object('breezy.branch'))
38
38
 
39
39
    def test_module_attr(self):
40
40
        self.assertIs(
41
 
            branch.Branch, get_named_object('brzlib.branch', 'Branch'))
 
41
            branch.Branch, get_named_object('breezy.branch', 'Branch'))
42
42
 
43
43
    def test_dotted_attr(self):
44
44
        self.assertIs(
45
45
            branch.Branch.hooks,
46
 
            get_named_object('brzlib.branch', 'Branch.hooks'))
 
46
            get_named_object('breezy.branch', 'Branch.hooks'))
47
47
 
48
48
    def test_package(self):
49
 
        # brzlib.tests is a package, not simply a module
50
 
        self.assertIs(tests, get_named_object('brzlib.tests'))
 
49
        # breezy.tests is a package, not simply a module
 
50
        self.assertIs(tests, get_named_object('breezy.tests'))
51
51
 
52
52
    def test_package_attr(self):
53
 
        # brzlib.tests is a package, not simply a module
 
53
        # breezy.tests is a package, not simply a module
54
54
        self.assertIs(
55
 
            tests.TestCase, get_named_object('brzlib.tests', 'TestCase'))
 
55
            tests.TestCase, get_named_object('breezy.tests', 'TestCase'))
56
56
 
57
57
    def test_import_error(self):
58
58
        self.assertRaises(ImportError, get_named_object, 'NO_SUCH_MODULE')