~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

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

  • Committer: John Arbash Meinel
  • Date: 2010-08-02 19:20:30 UTC
  • mto: This revision was merged to the branch mainline in revision 5369.
  • Revision ID: john@arbash-meinel.com-20100802192030-p5ofsyvopbog4xj3
Simplify the test to better cope with platform and version variation.

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
 
 
63
51
class TestDeprecationWarning(tests.TestCaseWithTransport):
64
52
    """The deprecation warning is controlled via a global variable:
65
53
    repository._deprecation_warning_done. As such, it can be emitted only once