Exemplo n.º 1
0
    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))
Exemplo n.º 2
0
    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))
Exemplo n.º 3
0
 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)
Exemplo n.º 4
0
 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)
Exemplo n.º 5
0
 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)
Exemplo n.º 6
0
 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)
Exemplo n.º 7
0
 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)
Exemplo n.º 8
0
 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)
Exemplo n.º 9
0
 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)