~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/blackbox/test_exceptions.py

  • Committer: Jelmer Vernooij
  • Date: 2010-12-20 11:57:14 UTC
  • mto: This revision was merged to the branch mainline in revision 5577.
  • Revision ID: jelmer@samba.org-20101220115714-2ru3hfappjweeg7q
Don't use no-plugins.

Show diffs side-by-side

added added

removed removed

Lines of Context:
48
48
        self.assertContainsRe(err, r'Bazaar has encountered an internal error')
49
49
 
50
50
 
 
51
class TestOptParseBugHandling(TestCase):
 
52
    "Test that we handle http://bugs.python.org/issue2931"
 
53
 
 
54
    def test_nonascii_optparse(self):
 
55
        """Reasonable error raised when non-ascii in option name"""
 
56
        if sys.version_info < (2,5):
 
57
            error_re = 'no such option'
 
58
        else:
 
59
            error_re = 'Only ASCII permitted in option names'
 
60
        out = self.run_bzr_error([error_re], ['st',u'-\xe4'])
 
61
 
 
62
 
51
63
class TestDeprecationWarning(tests.TestCaseWithTransport):
52
64
    """The deprecation warning is controlled via a global variable:
53
65
    repository._deprecation_warning_done. As such, it can be emitted only once