/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: Robert Collins
  • Date: 2007-02-02 10:48:06 UTC
  • mto: (2257.1.1 integration)
  • mto: This revision was merged to the branch mainline in revision 2258.
  • Revision ID: robertc@robertcollins.net-20070202104806-2lfxhf4zsocxuc43
Cleanup commented out cruft in plugin tests.

Show diffs side-by-side

added added

removed removed

Lines of Context:
31
31
from bzrlib.tests import TestCaseInTempDir
32
32
from bzrlib.osutils import pathjoin, abspath
33
33
 
34
 
class PluginTest(TestCaseInTempDir):
35
 
    """Create an external plugin and test loading."""
36
 
#    def test_plugin_loading(self):
37
 
#        orig_help = self.run_bzr_captured('bzr help commands')[0]
38
 
#        os.mkdir('plugin_test')
39
 
#        f = open(pathjoin('plugin_test', 'myplug.py'), 'wt')
40
 
#        f.write(PLUGIN_TEXT)
41
 
#        f.close()
42
 
#        newhelp = self.run_bzr_captured('bzr help commands')[0]
43
 
#        assert newhelp.startswith('You have been overridden\n')
44
 
#        # We added a line, but the rest should work
45
 
#        assert newhelp[25:] == help
46
 
#
47
 
#        assert backtick('bzr commit -m test') == "I'm sorry dave, you can't do that\n"
48
 
#
49
 
#        shutil.rmtree('plugin_test')
50
 
#
51
 
 
52
 
#         os.environ['BZRPLUGINPATH'] = abspath('plugin_test')
53
 
#         help = backtick('bzr help commands')
54
 
#         assert help.find('myplug') != -1
55
 
#         assert help.find('Just a simple test plugin.') != -1
56
 
 
57
 
 
58
 
#         assert backtick('bzr myplug') == 'Hello from my plugin\n'
59
 
#         assert backtick('bzr mplg') == 'Hello from my plugin\n'
60
 
 
61
 
#         f = open(pathjoin('plugin_test', 'override.py'), 'wb')
62
 
#         f.write("""import bzrlib, bzrlib.commands
63
 
#     class cmd_commit(bzrlib.commands.cmd_commit):
64
 
#         '''Commit changes into a new revision.'''
65
 
#         def run(self, *args, **kwargs):
66
 
#             print "I'm sorry dave, you can't do that"
67
 
 
68
 
#     class cmd_help(bzrlib.commands.cmd_help):
69
 
#         '''Show help on a command or other topic.'''
70
 
#         def run(self, *args, **kwargs):
71
 
#             print "You have been overridden"
72
 
#             bzrlib.commands.cmd_help.run(self, *args, **kwargs)
73
 
 
74
 
#         """
75
34
 
76
35
PLUGIN_TEXT = """\
77
36
import bzrlib.commands