/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 breezy/tests/test_source.py

  • Committer: Jelmer Vernooij
  • Date: 2018-06-30 14:28:33 UTC
  • mfrom: (7005 work)
  • mto: This revision was merged to the branch mainline in revision 7008.
  • Revision ID: jelmer@jelmer.uk-20180630142833-eg208wfe8la76m0x
Merge trunk.

Show diffs side-by-side

added added

removed removed

Lines of Context:
74
74
    def find_occurences(self, rule, filename):
75
75
        """Find the number of occurences of rule in a file."""
76
76
        occurences = 0
77
 
        source = file(filename, 'r')
 
77
        source = open(filename, 'r')
78
78
        for line in source:
79
79
            if line.find(rule) > -1:
80
80
                occurences += 1