예제 #1
0
 def test_holder_hans_jurgen_html(self):
     test_file = self.get_test_loc(
         'holders/holder_hans_jurgen_html-9_html.html')
     expected = [
         u'Hans-Jurgen Koch.',
     ]
     check_detection(expected, test_file, what='holders')
예제 #2
0
 def test_author_avinash_kak(self):
     test_file = self.get_test_loc('authors/author_avinash_kak-BitVector_py.py')
     expected = [
         u'Avinash Kak ([email protected])',
         u'Avinash Kak ([email protected])',
     ]
     check_detection(expected, test_file, what='authors')
예제 #3
0
 def test_author_gthomas_c(self):
     test_file = self.get_test_loc('authors/author_gthomas_c-c.c')
     expected = [
         u'gthomas, [email protected]',
         u'gthomas, [email protected], [email protected]',
     ]
     check_detection(expected, test_file, what='authors')
예제 #4
0
 def test_author_treetablemodeladapter_java_split_alright(self):
     test_file = self.get_test_loc('authors/author_treetablemodeladapter_java-TreeTableModelAdapter_java.java')
     expected = [
         u'Philip Milne',
         u'Scott Violet',
     ]
     check_detection(expected, test_file, what='authors')
예제 #5
0
 def test_author_var_route_c(self):
     test_file = self.get_test_loc('authors/author_var_route_c-var_route_c.c')
     # these are detected as copyrights, not authors
     # u'Erik Schoenfelder ([email protected])',
     # u'Simon Leinen ([email protected])',
     expected = []
     check_detection(expected, test_file, what='authors')
예제 #6
0
 def test_holder_audio_c(self):
     test_file = self.get_test_loc('holders/holder_audio_c-c.c')
     expected = [
         'AudioCodes, DSP Group',
         'France Telecom, Universite de Sherbrooke.',
     ]
     check_detection(expected, test_file, what='holders')
예제 #7
0
 def test_author_russ_c(self):
     test_file = self.get_test_loc('authors/author_russ_c-c.c')
     # these are detected as copyrights, not authors
     # u'Russ Dill <*****@*****.**>',
     # u'Vladimir Oleynik <*****@*****.**>',
     expected = []
     check_detection(expected, test_file, what='authors')
예제 #8
0
 def test_holder_javascript(self):
     test_file = self.get_test_loc('holders/holder_javascript-utilities_js.js')
     expected = [
         'Yahoo! Inc.',
         'Robert Penner',
     ]
     check_detection(expected, test_file, what='holders')
예제 #9
0
 def test_holder_addr_c(self):
     test_file = self.get_test_loc('holders/holder_addr_c-addr_c.c')
     expected = [
         'Cornell University.',
         'Jon Doe.',
     ]
     check_detection(expected, test_file, what='holders')
 def test_holder_super_c(self):
     test_file = self.get_test_loc('holders/holder_super_c-c.c')
     expected = [
         'Super Technologies Corporation, Cedar Rapids, Iowa, U.S.A.',
         'Benjamin Herrenschmuidt IBM Corp.',
     ]
     check_detection(expected, test_file, what='holders')
예제 #11
0
 def test_holder_in_license(self):
     test_file = self.get_test_loc('holders/holder_in_license-COPYING_gpl.gpl')
     expected = [
         'Free Software Foundation, Inc.',
         'the Free Software Foundation',
     ]
     check_detection(expected, test_file, what='holders')
 def test_holder_stacktrace_cpp(self):
     test_file = self.get_test_loc(
         'holders/holder_stacktrace_cpp-stacktrace_cpp.cpp')
     expected = [
         'Rickard E. Faith',
     ]
     check_detection(expected, test_file, what='holders')
 def test_holder_snmptrapd_c(self):
     test_file = self.get_test_loc(
         'holders/holder_snmptrapd_c-snmptrapd_c.c')
     expected = [
         'Carnegie Mellon University',
     ]
     check_detection(expected, test_file, what='holders')
 def test_holder_multiline(self):
     test_file = self.get_test_loc(
         'holders/holder_multiline-Historical.txt')
     expected = [
         'GEORGE J. CARRETTE, CONCORD, MASSACHUSETTS.',
     ]
     check_detection(expected, test_file, what='holders')
예제 #15
0
 def test_holder_hostpad(self):
     test_file = self.get_test_loc('holders/holder_hostpad-hostapd_cli_c.c')
     expected = [
         'Jouni Malinen',
         'Jouni Malinen',
     ]
     check_detection(expected, test_file, what='holders')
예제 #16
0
 def test_holder_hostpad(self):
     test_file = self.get_test_loc('holders/holder_hostpad-hostapd_cli_c.c')
     expected = [
         'Jouni Malinen',
         'Jouni Malinen',
     ]
     check_detection(expected, test_file, what='holders')
 def test_holder_javascript_large(self):
     test_file = self.get_test_loc(
         'holders/holder_javascript_large-ext_all_js.js')
     expected = [
         'Ext JS, LLC',
     ]
     check_detection(expected, test_file, what='holders')
예제 #18
0
 def test_holder_in_uuencode_binary(self):
     test_file = self.get_test_loc(
         'holders/holder_in_uuencode_binary-mips_be_elf_hal_o_uu.uu')
     expected = [
         'Sam Leffler, Errno Consulting, Atheros Communications, Inc.',
     ]
     check_detection(expected, test_file, what='holders')
예제 #19
0
 def test_author_var_route_c(self):
     test_file = self.get_test_loc('authors/author_var_route_c-var_route_c.c')
     # these are detected as copyrights, not authors
     # u'Erik Schoenfelder ([email protected])',
     # u'Simon Leinen ([email protected])',
     expected = []
     check_detection(expected, test_file, what='authors')
예제 #20
0
 def test_holder_javascript(self):
     test_file = self.get_test_loc('holders/holder_javascript-utilities_js.js')
     expected = [
         'Yahoo! Inc.',
         'Robert Penner',
     ]
     check_detection(expected, test_file, what='holders')
예제 #21
0
 def test_author_var_route_c(self):
     test_file = self.get_test_loc('authors/author_var_route_c-var_route_c.c')
     expected = [
         u'Erik Schoenfelder ([email protected])',
         u'Simon Leinen ([email protected])',
     ]
     check_detection(expected, test_file, what='authors')
예제 #22
0
 def test_author_russ_c(self):
     test_file = self.get_test_loc('authors/author_russ_c-c.c')
     # these are detected as copyrights, not authors
     # u'Russ Dill <*****@*****.**>',
     # u'Vladimir Oleynik <*****@*****.**>',
     expected = []
     check_detection(expected, test_file, what='authors')
예제 #23
0
 def test_holder_var_route_c(self):
     test_file = self.get_test_loc('holders/holder_var_route_c-var_route_c.c')
     expected = [
         u'Carnegie Mellon University',
         u'TGV, Incorporated',
     ]
     check_detection(expected, test_file, what='holders')
예제 #24
0
 def test_years_hostpad(self):
     test_file = self.get_test_loc('years/years_hostpad-hostapd_cli_c.c')
     expected = [
         u'2004-2005',
         u'2004-2005',
     ]
     check_detection(expected, test_file, what='years')
예제 #25
0
 def test_author_gthomas_c(self):
     test_file = self.get_test_loc('authors/author_gthomas_c-c.c')
     expected = [
         u'Author(s) gthomas, [email protected]',
         u'Contributors gthomas, [email protected], [email protected]',
     ]
     check_detection(expected, test_file, what='authors')
예제 #26
0
 def test_holder_addr_c(self):
     test_file = self.get_test_loc('holders/holder_addr_c-addr_c.c')
     expected = [
         u'Cornell University.',
         u'Jon Doe.',
     ]
     check_detection(expected, test_file, what='holders')
예제 #27
0
 def test_holder_javascript_large(self):
     test_file = self.get_test_loc('holders/holder_javascript_large-ext_all_js.js')
     expected = [
         u'Ext JS, LLC',
         u'a.commit()'
      ]
     check_detection(expected, test_file, what='holders')
예제 #28
0
 def test_holder_in_copyright(self):
     test_file = self.get_test_loc(
         'holders/holder_in_copyright-COPYRIGHT_madwifi.madwifi')
     expected = [
         'Sam Leffler, Errno Consulting, Atheros Communications, Inc.',
     ]
     check_detection(expected, test_file, what='holders')
 def test_holder_mergesort_java(self):
     test_file = self.get_test_loc(
         'holders/holder_mergesort_java-MergeSort_java.java')
     expected = [
         'Sun Microsystems, Inc.',
     ]
     check_detection(expected, test_file, what='holders')
예제 #30
0
 def test_author_russ_c(self):
     test_file = self.get_test_loc('authors/author_russ_c-c.c')
     expected = [
         u'Russ Dill <*****@*****.**>',
         u'Vladimir Oleynik <*****@*****.**>',
     ]
     check_detection(expected, test_file, what='authors')
예제 #31
0
 def test_holder_in_license(self):
     test_file = self.get_test_loc('holders/holder_in_license-COPYING_gpl.gpl')
     expected = [
         'Free Software Foundation, Inc.',
         'Free Software Foundation',
     ]
     check_detection(expected, test_file, what='holders')
예제 #32
0
 def test_author_avinash_kak(self):
     test_file = self.get_test_loc('authors/author_avinash_kak-BitVector_py.py')
     expected = [
         u'Avinash Kak ([email protected])',
         u'Avinash Kak ([email protected])',
     ]
     check_detection(expected, test_file, what='authors')
예제 #33
0
 def test_holder_complex(self):
     test_file = self.get_test_loc('holders/holder_complex-strtol_c.c')
     expected = [
         'Regents of the University of California.',
         'University of California.',
     ]
     check_detection(expected, test_file, what='holders')
예제 #34
0
 def test_holder_atheros_py(self):
     test_file = self.get_test_loc('holders/holder_atheros_py-py.py')
     expected = [
         u'Atheros Communications, Inc.',
         u'Atheros Communications, Inc.',
         u'Intel Corporation.',
     ]
     check_detection(expected, test_file, what='holders')
예제 #35
0
 def test_holder_atheros_py(self):
     test_file = self.get_test_loc('holders/holder_atheros_py-py.py')
     expected = [
         u'Atheros Communications, Inc.',
         u'Atheros Communications, Inc.',
         u'Intel Corporation.',
     ]
     check_detection(expected, test_file, what='holders')
예제 #36
0
 def test_holder_treetablemodeladapter_java(self):
     test_file = self.get_test_loc(
         'holders/holder_treetablemodeladapter_java-TreeTableModelAdapter_java.java'
     )
     expected = [
         u'Sun Microsystems, Inc.',
     ]
     check_detection(expected, test_file, what='holders')
예제 #37
0
 def test_author_uc(self):
     test_file = self.get_test_loc('authors/author_uc-LICENSE')
     expected = [
         'developed by the University of California, Berkeley and its contributors.',
         'developed by UC Berkeley and its contributors.',
         'developed by the University of California, Berkeley and its contributors.',
     ]
     check_detection(expected, test_file, what='authors')
예제 #38
0
 def test_holder_somefile_cpp(self):
     test_file = self.get_test_loc(
         'holders/holder_somefile_cpp-somefile_cpp.cpp')
     expected = [
         u'Private Company', u'(PC) Property of Private Company',
         u'(PC) Property', u'Private Company', u'Private Company'
     ]
     check_detection(expected, test_file, what='holders')
예제 #39
0
 def test_holder_var_route_c(self):
     test_file = self.get_test_loc(
         'holders/holder_var_route_c-var_route_c.c')
     expected = [
         u'Carnegie Mellon University', u'TGV, Incorporated',
         u'Erik Schoenfelder', u'Simon Leinen'
     ]
     check_detection(expected, test_file, what='holders')
예제 #40
0
 def test_holder_super_c(self):
     test_file = self.get_test_loc('holders/holder_super_c-c.c')
     expected = [
         u'Super Technologies Corporation',
         u'Cedar Rapids, Iowa',
         u'Benjamin Herrenschmuidt',
         u'IBM Corp.',
     ]
     check_detection(expected, test_file, what='holders')
예제 #41
0
 def test_holder_audio_c(self):
     test_file = self.get_test_loc('holders/holder_audio_c-c.c')
     expected = [
         u'AudioCodes, DSP Group',
         u'France Telecom, Universite de Sherbrooke.',
         u'France Telecom',
         u'Universite de Sherbrooke.',
     ]
     check_detection(expected, test_file, what='holders')
예제 #42
0
 def test_author_young_c(self):
     test_file = self.get_test_loc('authors/author_young_c-c.c')
     expected = [
         u'written by Eric Young ([email protected]).',
         u'Tim Hudson ([email protected]).',
         u'written by Eric Young ([email protected])',
         u'written by Tim Hudson ([email protected])',
     ]
     check_detection(expected, test_file, what='authors')
예제 #43
0
 def test_holder_somefile_cpp(self):
     test_file = self.get_test_loc('holders/holder_somefile_cpp-somefile_cpp.cpp')
     expected = [
         u'Private Company',
         u'(PC) Property of Private Company',
         u'(PC) Property',
         u'Private Company',
         u'Private Company'
     ]
     check_detection(expected, test_file, what='holders')
예제 #44
0
 def test_holder_ibm_c(self):
     test_file = self.get_test_loc('holders/holder_ibm_c-ibm_c.c')
     expected = [
         u'ibm technologies',
         u'IBM Corporation',
         u'Ibm Corp.',
         u'ibm.com',
         u'IBM technology',
         u'IBM company',
     ]
     check_detection(expected, test_file, what='holders')
예제 #45
0
 def test_holder_ibm_c(self):
     test_file = self.get_test_loc('holders/holder_ibm_c-ibm_c.c')
     expected = [
         u'ibm technologies',
         u'IBM Corporation',
         u'Ibm Corp.',
         u'ibm.com',
         u'IBM technology',
         u'IBM company',
     ]
     check_detection(expected, test_file, what='holders')
    def test_author_young_c(self):
        test_file = self.get_test_loc('authors/author_young_c-c.c')
        expected = [
            u'Eric Young ([email protected]).',
            #            u'Tim Hudson ([email protected]).',
            u'Eric Young ([email protected])',
            u'Tim Hudson ([email protected])',
        ]
        check_detection(expected, test_file, what='authors')

        expected = [u'Copyright (c) 1995-1997 Eric Young ([email protected])']
        check_detection(expected, test_file, what='copyrights')
    def test_author_with_trailing_date(self):
        test_lines = '''
         As of:   commit 006b89d4464ae1bb6d545ea5716998654124df45   Author: Nikos Mavrogiannopoulos <*****@*****.**>   Date:   Fri Apr 1 10:46:12 2016 +0200     priorities:

       * : commit 3debe362faa62e5b381b880e3ba23aee07c85f6e Author:
        Alexander Kanavin <*****@*****.**> Date:   Wed Dec 14
        17:42:45 2016 +0200

        '''.splitlines(False)
        expected = [
            u'Nikos Mavrogiannopoulos <*****@*****.**>',
            u'Alexander Kanavin <*****@*****.**>',
        ]
        check_detection(expected, test_lines, what='authors')
예제 #48
0
 def test_holder_in_text_(self):
     test_file = self.get_test_loc('holders/holder_in_text_.txt')
     expected = [
         'Markus Franz Xaver Johannes Oberhumer',
         'Markus Franz Xaver Johannes Oberhumer',
         'Markus Franz Xaver Johannes Oberhumer',
         'Markus Franz Xaver Johannes Oberhumer',
         'Markus Franz Xaver Johannes Oberhumer',
         'Markus Franz Xaver Johannes Oberhumer',
         'Markus Franz Xaver Johannes Oberhumer',
         'Markus Franz Xaver Johannes Oberhumer',
         'Markus Franz Xaver Johannes Oberhumer',
         'Markus Franz Xaver Johannes Oberhumer',
     ]
     check_detection(expected, test_file, what='holders')
예제 #49
0
 def test_years_in_txt(self):
     test_file = self.get_test_loc('years/years_in_txt.txt')
     expected = [
         u'2005',
         u'2004',
         u'2003',
         u'2002',
         u'2001',
         u'2000',
         u'1999',
         u'1998',
         u'1997',
         u'1996',
     ]
     check_detection(expected, test_file, what='years')
예제 #50
0
 def test_years_in_txt(self):
     test_file = self.get_test_loc('years/years_in_txt.txt')
     expected = [
         u'2005',
         u'2004',
         u'2003',
         u'2002',
         u'2001',
         u'2000',
         u'1999',
         u'1998',
         u'1997',
         u'1996',
     ]
     check_detection(expected, test_file, what='years')
예제 #51
0
 def test_holder_in_text_(self):
     test_file = self.get_test_loc('holders/holder_in_text_.txt')
     expected = [
         'Markus Franz Xaver Johannes Oberhumer',
         'Markus Franz Xaver Johannes Oberhumer',
         'Markus Franz Xaver Johannes Oberhumer',
         'Markus Franz Xaver Johannes Oberhumer',
         'Markus Franz Xaver Johannes Oberhumer',
         'Markus Franz Xaver Johannes Oberhumer',
         'Markus Franz Xaver Johannes Oberhumer',
         'Markus Franz Xaver Johannes Oberhumer',
         'Markus Franz Xaver Johannes Oberhumer',
         'Markus Franz Xaver Johannes Oberhumer',
     ]
     check_detection(expected, test_file, what='holders')
예제 #52
0
 def test_holder_basic(self):
     test_file = self.get_test_loc('holders/holder_basic-copy_c.c')
     expected = [
         'Markus Franz Xaver Johannes Oberhumer',
         'Markus Franz Xaver Johannes Oberhumer',
         'Markus Franz Xaver Johannes Oberhumer',
         'Markus Franz Xaver Johannes Oberhumer',
         'Markus Franz Xaver Johannes Oberhumer',
         'Markus Franz Xaver Johannes Oberhumer',
         'Markus Franz Xaver Johannes Oberhumer',
         'Markus Franz Xaver Johannes Oberhumer',
         'Markus Franz Xaver Johannes Oberhumer',
         'Markus Franz Xaver Johannes Oberhumer',
         'Markus Franz Xaver Johannes Oberhumer',
         'Markus Franz Xaver Johannes Oberhumer',
         'Markus Franz Xaver Johannes Oberhumer',
         'Markus Franz Xaver Johannes Oberhumer',
     ]
     check_detection(expected, test_file, what='holders')
예제 #53
0
 def test_author_in_java(self):
     test_file = self.get_test_loc('authors/author_in_java-MergeSort_java.java')
     expected = [
         u'Scott Violet',
     ]
     check_detection(expected, test_file, what='authors')
예제 #54
0
 def test_author_gary(self):
     test_file = self.get_test_loc('authors/author_gary-ProjectInfo_java.java')
     expected = [
         "Gary O'Neall",
     ]
     check_detection(expected, test_file, what='authors')
예제 #55
0
 def test_author_expat(self):
     test_file = self.get_test_loc('authors/author_expat-expat_h.h')
     expected = []
     check_detection(expected, test_file, what='authors')
예제 #56
0
 def test_author_do_not_detect_authorize_as_author(self):
     test_file = self.get_test_loc('authors/author_do_not_detect_authorize_as_author.csv')
     expected = []
     check_detection(expected, test_file, what='authors')
예제 #57
0
 def test_author_correct(self):
     test_file = self.get_test_loc('authors/author_correct-detail_9_html.html')
     expected = []
     check_detection(expected, test_file, what='authors')