Comment 3 for bug 897046

Revision history for this message
Neil Martinsen-Burrell (nmb) wrote : Re: hooks not being loaded in script-based tests

The script-based test is a red herring. This also fails under run_bzr:

out, err = self.run_bzr('hooks')
self.assertContainsRe(out, 'hook is a test')

Apparently bzrlib.tests.TestCase clears out all of the hooks before it runs. One can work around this by installing the hook in the test as is done in the bzrlib tests. This doesn't allow the same level of integration testing but it is understandable for isolation purposes.