/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_plugins.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2008-04-04 12:20:38 UTC
  • mfrom: (3334.1.1 trunk)
  • Revision ID: pqm@pqm.ubuntu.com-20080404122038-852408u460mitk5y
(vila) More aggressive test loader for selftest --load-list

Show diffs side-by-side

added added

removed removed

Lines of Context:
32
32
import bzrlib.commands
33
33
import bzrlib.help
34
34
from bzrlib.symbol_versioning import one_three
35
 
from bzrlib.tests import TestCase, TestCaseInTempDir
 
35
from bzrlib.tests import (
 
36
    TestCase,
 
37
    TestCaseInTempDir,
 
38
    TestUtil,
 
39
    )
36
40
from bzrlib.osutils import pathjoin, abspath, normpath
37
41
 
38
42
 
282
286
        plugin = bzrlib.plugin.plugins()['plugin']
283
287
        self.assertEqual('foo', plugin.test_suite())
284
288
 
 
289
    def test_no_load_plugin_tests_gives_None_for_load_plugin_tests(self):
 
290
        self.setup_plugin()
 
291
        loader = TestUtil.TestLoader()
 
292
        plugin = bzrlib.plugin.plugins()['plugin']
 
293
        self.assertEqual(None, plugin.load_plugin_tests(loader))
 
294
 
 
295
    def test_load_plugin_tests_gives_load_plugin_tests_result(self):
 
296
        source = """
 
297
def load_tests(standard_tests, module, loader):
 
298
    return 'foo'"""
 
299
        self.setup_plugin(source)
 
300
        loader = TestUtil.TestLoader()
 
301
        plugin = bzrlib.plugin.plugins()['plugin']
 
302
        self.assertEqual('foo', plugin.load_plugin_tests(loader))
 
303
 
285
304
    def test_no_version_info(self):
286
305
        self.setup_plugin()
287
306
        plugin = bzrlib.plugin.plugins()['plugin']