def test_lgpl_with_lf_file(self): # Be verbose by default common.g_trace = True # Load the test file dir_path = os.path.dirname(os.path.realpath(__file__)) file = common.file_on_disk(dir_path + '/data/forbidtoken_lf.cpp') # Apply the hook result = forbidtoken.forbidtoken(file, 'lgpl') # Check result self.assertFalse(result, "lgpl were detected in test file.")
def test_tab_with_tab_file(self): # Be verbose by default common.g_trace = True # Load the test file dir_path = os.path.dirname(os.path.realpath(__file__)) file = common.file_on_disk(dir_path + '/data/forbidtoken_tab.cpp') # Apply the hook result = forbidtoken.forbidtoken(file, 'tab') # Check result self.assertTrue(result, "tab were not detected in test file.")