def test_license_special_files(self): tests = [('legal/COPYING', 'yes'), ('legal/Copyrights', 'maybe'), ('legal/LICENSE', 'yes'), ('legal/Notice', 'yes'), ('legal/no_license_in_here.java', 'maybe'), ('legal/noticE.html', 'yes'), ('legal/useless_notice.txt', 'maybe')] for tf, expected in tests: assert expected == legal.is_special_legal_file( self.get_test_loc(tf))
def test_license_special_files(self): tests = [ ('legal/COPYING', 'yes'), ('legal/Copyrights', 'maybe'), ('legal/LICENSE', 'yes'), ('legal/Notice', 'yes'), ('legal/no_license_in_here.java', 'maybe'), ('legal/noticE.html', 'yes'), ('legal/useless_notice.txt', 'maybe') ] for tf, expected in tests: assert expected == legal.is_special_legal_file(self.get_test_loc(tf))
def test_is_special_legal_file_noticE_html(self): test_loc = self.get_test_loc('legal/noticE.html') expected = 'yes' assert expected == legal.is_special_legal_file(test_loc)
def test_is_special_legal_file_useless_notice_txt(self): test_loc = self.get_test_loc('legal/useless_notice.txt') expected = 'maybe' assert expected == legal.is_special_legal_file(test_loc)
def test_is_special_legal_file_no_license_in_here_java(self): test_loc = self.get_test_loc('legal/no_license_in_here.java') expected = 'maybe' assert expected == legal.is_special_legal_file(test_loc)
def test_is_special_legal_file_Notice(self): test_loc = self.get_test_loc('legal/Notice') expected = 'yes' assert expected == legal.is_special_legal_file(test_loc)
def test_is_special_legal_file_LICENSE(self): test_loc = self.get_test_loc('legal/LICENSE') expected = 'yes' assert expected == legal.is_special_legal_file(test_loc)
def test_is_special_legal_file_Copyrights(self): test_loc = self.get_test_loc('legal/Copyrights') expected = 'yes' assert expected == legal.is_special_legal_file(test_loc)
def test_is_special_legal_file_COPYING(self): test_loc = self.get_test_loc('legal/COPYING') expected = 'yes' assert expected == legal.is_special_legal_file(test_loc)