~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_reconfigure.py

  • Committer: Vincent Ladeuil
  • Date: 2009-05-15 10:14:51 UTC
  • mto: (4396.1.1 integration)
  • mto: This revision was merged to the branch mainline in revision 4397.
  • Revision ID: v.ladeuil+lp@free.fr-20090515101451-bffnsywhvaskrz1h
Use stderr for UI prompt to address bug #376582.

* bzrlib/ui/__init__.py:
(CLIUIFactory.prompt): Display prompt on stderr.

* bzrlib/tests/test_ui.py: (UITests.test_text_factory_ascii_password,
UITests.test_text_factory_utf8_password,
UITests.assert_get_bool_acceptance_of_user_input,
UITests.test_text_factory_prompt,
UITests.test_silent_ui_getusername,
UITests.test_text_ui_getusername,
UITests.test_text_ui_getusername_utf8):prompt is now displayed on
stderr.

* bzrlib/tests/test_http.py:
(TestAuth.test_prompt_for_username,
TestAuth.test_prompt_for_password): prompt is now displayed on
stderr.

* bzrlib/tests/test_config.py:
(TestAuthenticationConfig._check_default_password_prompt,
TestAuthenticationConfig._check_default_username_prompt): prompt
is now displayed on stderr.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# Copyright (C) 2007, 2008, 2009 Canonical Ltd
 
1
# Copyright (C) 2007 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
44
44
        self.assertRaises(errors.NoWorkingTree, workingtree.WorkingTree.open,
45
45
                          'tree')
46
46
 
47
 
    def test_tree_with_pending_merge_to_branch(self):
48
 
        tree = self.make_branch_and_tree('tree')
49
 
        other_tree = tree.bzrdir.sprout('other').open_workingtree()
50
 
        self.build_tree(['other/file'])
51
 
        other_tree.add('file')
52
 
        other_tree.commit('file added')
53
 
        tree.merge_from_branch(other_tree.branch)
54
 
        reconfiguration = reconfigure.Reconfigure.to_branch(tree.bzrdir)
55
 
        self.assertRaises(errors.UncommittedChanges, reconfiguration.apply)
56
 
        reconfiguration.apply(force=True)
57
 
        self.assertRaises(errors.NoWorkingTree, workingtree.WorkingTree.open,
58
 
                          'tree')
59
 
 
60
47
    def test_branch_to_branch(self):
61
48
        branch = self.make_branch('branch')
62
49
        self.assertRaises(errors.AlreadyBranch,