~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_commands.py

  • Committer: Patch Queue Manager
  • Date: 2016-02-01 19:56:05 UTC
  • mfrom: (6615.1.1 trunk)
  • Revision ID: pqm@pqm.ubuntu.com-20160201195605-o7rl92wf6uyum3fk
(vila) Open trunk again as 2.8b1 (Vincent Ladeuil)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# Copyright (C) 2005-2011 Canonical Ltd
 
1
# Copyright (C) 2005-2012, 2016 Canonical Ltd
2
2
#
3
3
# This program is free software; you can redistribute it and/or modify
4
4
# it under the terms of the GNU General Public License as published by
98
98
            # We override the run() command method so we can observe the
99
99
            # overrides from inside.
100
100
            c = config.GlobalStack()
101
 
            self.assertEquals('12', c.get('xx'))
102
 
            self.assertEquals('foo', c.get('yy'))
 
101
            self.assertEqual('12', c.get('xx'))
 
102
            self.assertEqual('foo', c.get('yy'))
103
103
        self.overrideAttr(builtins.cmd_rocks, 'run', run)
104
104
        self.run_bzr(['rocks', '-Oxx=12', '-Oyy=foo'])
105
105
        c = config.GlobalStack()
106
106
        # Ensure that we don't leak outside of the command
107
 
        self.assertEquals(None, c.get('xx'))
108
 
        self.assertEquals(None, c.get('yy'))
 
107
        self.assertEqual(None, c.get('xx'))
 
108
        self.assertEqual(None, c.get('yy'))
109
109
 
110
110
 
111
111
class TestInvokedAs(tests.TestCase):
117
117
        # get one from the real get_cmd_object.
118
118
        c = commands.get_cmd_object('ci')
119
119
        self.assertIsInstance(c, builtins.cmd_commit)
120
 
        self.assertEquals(c.invoked_as, 'ci')
 
120
        self.assertEqual(c.invoked_as, 'ci')
121
121
 
122
122
 
123
123
class TestGetAlias(tests.TestCase):
194
194
class TestRegisterLazy(tests.TestCase):
195
195
 
196
196
    def setUp(self):
197
 
        tests.TestCase.setUp(self)
 
197
        super(TestRegisterLazy, self).setUp()
198
198
        import bzrlib.tests.fake_command
199
199
        del sys.modules['bzrlib.tests.fake_command']
200
200
        global lazy_command_imported