~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_plugins.py

Merge with walkdirs

Show diffs side-by-side

added added

removed removed

Lines of Context:
437
437
 
438
438
    def test_set_plugins_path_with_trailing_slashes(self):
439
439
        """set_plugins_path should set the module __path__ based on
440
 
        BZR_PLUGIN_PATH."""
 
440
        BZR_PLUGIN_PATH after removing all trailing slashes."""
441
441
        old_path = bzrlib.plugins.__path__
442
442
        old_env = os.environ.get('BZR_PLUGIN_PATH')
443
443
        try:
445
445
            os.environ['BZR_PLUGIN_PATH'] = "first\\//\\" + os.pathsep + \
446
446
                "second/\\/\\/"
447
447
            bzrlib.plugin.set_plugins_path()
448
 
            expected_path = ['first', 'second',
449
 
                os.path.dirname(bzrlib.plugins.__file__)]
 
448
            # We expect our nominated paths to have all path-seps removed,
 
449
            # and this is testing only that.
 
450
            expected_path = ['first', 'second']
450
451
            self.assertEqual(expected_path,
451
452
                bzrlib.plugins.__path__[:len(expected_path)])
452
453
        finally: