~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_plugins.py

  • Committer: Martin Pool
  • Date: 2008-01-16 00:26:25 UTC
  • mto: This revision was merged to the branch mainline in revision 3190.
  • Revision ID: mbp@sourcefrog.net-20080116002625-c1hbpaxotm5be1rj
Improved and reformatted developer documentation on the Bazaar release process.

Show diffs side-by-side

added added

removed removed

Lines of Context:
273
273
        plugin_path = self.test_dir + '/plugin.py'
274
274
        self.assertIsSameRealPath(plugin_path, normpath(plugin.path()))
275
275
 
276
 
    def test_plugin_get_path_py_not_pyc(self):
277
 
        self.setup_plugin()         # after first import there will be plugin.pyc
278
 
        self.teardown_plugin()
279
 
        bzrlib.plugin.load_from_path(['.']) # import plugin.pyc
280
 
        plugins = bzrlib.plugin.plugins()
281
 
        plugin = plugins['plugin']
282
 
        plugin_path = self.test_dir + '/plugin.py'
283
 
        self.assertIsSameRealPath(plugin_path, normpath(plugin.path()))
284
 
 
285
 
    def test_plugin_get_path_pyc_only(self):
286
 
        self.setup_plugin()         # after first import there will be plugin.pyc
287
 
        self.teardown_plugin()
288
 
        os.unlink(self.test_dir + '/plugin.py')
289
 
        bzrlib.plugin.load_from_path(['.']) # import plugin.pyc
290
 
        plugins = bzrlib.plugin.plugins()
291
 
        plugin = plugins['plugin']
292
 
        if __debug__:
293
 
            plugin_path = self.test_dir + '/plugin.pyc'
294
 
        else:
295
 
            plugin_path = self.test_dir + '/plugin.pyo'
296
 
        self.assertIsSameRealPath(plugin_path, normpath(plugin.path()))
297
 
 
298
276
    def test_no_test_suite_gives_None_for_test_suite(self):
299
277
        self.setup_plugin()
300
278
        plugin = bzrlib.plugin.plugins()['plugin']