~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_plugins.py

  • Committer: Robert Collins
  • Date: 2006-01-02 22:37:32 UTC
  • mfrom: (1185.50.33 bzr-jam-integration)
  • Revision ID: robertc@robertcollins.net-20060102223732-d5221b37ff0f7888
Merge in John Meinels integration branch.

Show diffs side-by-side

added added

removed removed

Lines of Context:
26
26
import bzrlib.plugin
27
27
import bzrlib.plugins
28
28
from bzrlib.tests import TestCaseInTempDir
 
29
from bzrlib.osutils import pathjoin, abspath
29
30
 
30
31
class PluginTest(TestCaseInTempDir):
31
32
    """Create an external plugin and test loading."""
32
33
#    def test_plugin_loading(self):
33
34
#        orig_help = self.run_bzr_captured('bzr help commands')[0]
34
35
#        os.mkdir('plugin_test')
35
 
#        f = open(os.path.join('plugin_test', 'myplug.py'), 'wt')
 
36
#        f = open(pathjoin('plugin_test', 'myplug.py'), 'wt')
36
37
#        f.write(PLUGIN_TEXT)
37
38
#        f.close()
38
39
#        newhelp = self.run_bzr_captured('bzr help commands')[0]
45
46
#        shutil.rmtree('plugin_test')
46
47
#
47
48
 
48
 
#         os.environ['BZRPLUGINPATH'] = os.path.abspath('plugin_test')
 
49
#         os.environ['BZRPLUGINPATH'] = abspath('plugin_test')
49
50
#         help = backtick('bzr help commands')
50
51
#         assert help.find('myplug') != -1
51
52
#         assert help.find('Just a simple test plugin.') != -1
54
55
#         assert backtick('bzr myplug') == 'Hello from my plugin\n'
55
56
#         assert backtick('bzr mplg') == 'Hello from my plugin\n'
56
57
 
57
 
#         f = open(os.path.join('plugin_test', 'override.py'), 'wb')
 
58
#         f = open(pathjoin('plugin_test', 'override.py'), 'wb')
58
59
#         f.write("""import bzrlib, bzrlib.commands
59
60
#     class cmd_commit(bzrlib.commands.cmd_commit):
60
61
#         '''Commit changes into a new revision.'''