~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_symbol_versioning.py

  • Committer: Martin
  • Date: 2010-04-02 19:12:58 UTC
  • mto: (5177.1.1 integration2)
  • mto: This revision was merged to the branch mainline in revision 5179.
  • Revision ID: gzlist@googlemail.com-20100402191258-xrwedy2ffe0q4t7x
Permit bzrlib to run under python -OO by explictly assigning to __doc__ for user-visible docstrings

Show diffs side-by-side

added added

removed removed

Lines of Context:
179
179
    def check_deprecated_callable(self, expected_warning, expected_docstring,
180
180
                                  expected_name, expected_module,
181
181
                                  deprecated_callable):
 
182
        if __doc__ is None:
 
183
            # With -OO the docstring should just be the deprecated version
 
184
            expected_docstring = expected_docstring.split('\n')[-2].lstrip()
182
185
        old_warning_method = symbol_versioning.warn
183
186
        try:
184
187
            symbol_versioning.set_warning_method(self.capture_warning)