~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_source.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2006-11-06 22:35:54 UTC
  • mfrom: (2120.2.1 no_tabs)
  • Revision ID: pqm@pqm.ubuntu.com-20061106223554-ddb45c6a08929e08
(John Arbash Meinel) remove tabs from source files

Show diffs side-by-side

added added

removed removed

Lines of Context:
252
252
                help_text.append((' '*4) + fname)
253
253
 
254
254
            self.fail('\n'.join(help_text))
 
255
 
 
256
    def test_no_tabs(self):
 
257
        """bzrlib source files should not contain any tab characters."""
 
258
        incorrect = []
 
259
 
 
260
        for fname, text in self.get_source_file_contents():
 
261
            if '\t' in text:
 
262
                incorrect.append(fname)
 
263
 
 
264
        if incorrect:
 
265
            self.fail('Tab characters were found in the following source files.'
 
266
              '\nThey should either be replaced by "\\t" or by spaces:'
 
267
              '\n\n    %s'
 
268
              % ('\n    '.join(incorrect)))