/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 bzrlib/tests/test_hooks.py

  • Committer: Robert Collins
  • Date: 2009-03-11 04:34:21 UTC
  • mto: This revision was merged to the branch mainline in revision 4118.
  • Revision ID: robertc@robertcollins.net-20090311043421-jua2wrjq86ltarx0
Include the Hooks class in the Hooks docs.

Show diffs side-by-side

added added

removed removed

Lines of Context:
51
51
 
52
52
    def test_docs(self):
53
53
        """docs() should return something reasonable about the Hooks."""
54
 
        hooks = Hooks()
 
54
        class MyHooks(Hooks):
 
55
            pass
 
56
        hooks = MyHooks()
55
57
        hooks['legacy'] = []
56
58
        hook1 = HookPoint('post_tip_change',
57
59
            "Invoked after the tip of a branch changes. Called with "
63
65
            (1, 6), None)
64
66
        hooks.create_hook(hook1)
65
67
        hooks.create_hook(hook2)
66
 
        self.assertEqual(
 
68
        self.assertEqualDiff(
 
69
            "MyHooks\n"
 
70
            "=======\n"
 
71
            "\n"
67
72
            "legacy\n"
68
73
            "------\n"
69
74
            "\n"
70
 
            "An old-style hook. For documentation see the __init__ method of 'Hooks'\n"
 
75
            "An old-style hook. For documentation see the __init__ method of 'MyHooks'\n"
71
76
            "\n"
72
77
            "post_tip_change\n"
73
78
            "---------------\n"