~sil2100/cupstream2distro/skip_all_projects

« back to all changes in this revision

Viewing changes to tests/tools/basetestcase.py

  • Committer: Didier Roche
  • Date: 2013-07-09 14:24:17 UTC
  • Revision ID: didier.roche@canonical.com-20130709142417-2g24hjvw3b5vfcg0
now generate the diff between source packages and not using bzr wizardery. Adapting tests for those

Show diffs side-by-side

added added

removed removed

Lines of Context:
99
99
        '''Return the ubuntu source package path for package_name'''
100
100
        return os.path.join(self.data_dir, 'ubuntu_source_packages', package_name)
101
101
 
102
 
    def are_files_identicals(self, filename1, filename2):
103
 
        '''Return true if filename1 and filename2 are equals'''
104
 
        return self.are_content_indenticals(open(filename1).read(), open(filename2).read())
105
 
 
106
 
    def are_content_indenticals(self, content1, content2):
107
 
        '''Return true if content1 and 2 are identicals'''
108
 
        return (content1 == content2)
109
 
 
110
102
    def assertFilesAreIdenticals(self, filename1, filename2):
111
103
        '''assert if the files content are identical'''
112
104
        self.assertEquals(open(filename1).read().strip(), open(filename2).read().strip())