/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to bzrlib/tests/__init__.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:
1312
1312
            f.close()
1313
1313
        self.assertEqualDiff(content, s)
1314
1314
 
 
1315
    def assertDocstring(self, expected_docstring, obj):
 
1316
        """Fail if obj does not have expected_docstring"""
 
1317
        if __doc__ is None:
 
1318
            # With -OO the docstring should be None instead
 
1319
            self.assertIs(obj.__doc__, None)
 
1320
        else:
 
1321
            self.assertEqual(expected_docstring, obj.__doc__)
 
1322
 
1315
1323
    def failUnlessExists(self, path):
1316
1324
        """Fail unless path or paths, which may be abs or relative, exist."""
1317
1325
        if not isinstance(path, basestring):
3795
3803
 
3796
3804
 
3797
3805
def _test_suite_modules_to_doctest():
3798
 
    """Return the list of modules to doctest."""   
 
3806
    """Return the list of modules to doctest."""
 
3807
    if __doc__ is None:
 
3808
        # GZ 2009-03-31: No docstrings with -OO so there's nothing to doctest
 
3809
        return []
3799
3810
    return [
3800
3811
        'bzrlib',
3801
3812
        'bzrlib.branchbuilder',