Beispiel #1
0
 def _filter_with_black_list(self):
    self._copy_black_list()
    white_file = '%s/%s/%s' % (self.folder, config.time_dir(), config.time_output_file())
    black_file = '%s/%s' % (self.folder, config.black_list_file())
    white_methods = self._read_file(white_file)
    black_methods = self._read_file(black_file)
    white_method_package = [line for line in white_methods if line not in black_methods and line.startswith(self.program.options.package)]
    white_method_filtered = [line for line in white_method_package if not '<init>' in line]
    white_list_file = '%s/%s' % (self.folder, config.white_list_file())
    self._write_file(white_list_file, white_method_filtered)
Beispiel #2
0
 def _filter_with_black_list(self):
     self._copy_black_list()
     white_file = '%s/%s/%s' % (self.folder, config.time_dir(),
                                config.time_output_file())
     black_file = '%s/%s' % (self.folder, config.black_list_file())
     white_methods = self._read_file(white_file)
     black_methods = self._read_file(black_file)
     white_method_package = [
         line for line in white_methods if line not in black_methods
         and line.startswith(self.program.options.package)
     ]
     white_method_filtered = [
         line for line in white_method_package if not '<init>' in line
     ]
     white_list_file = '%s/%s' % (self.folder, config.white_list_file())
     self._write_file(white_list_file, white_method_filtered)
Beispiel #3
0
 def _copy_black_list(self):
     from_file = '%s/memoizeit/%s' % (commons.general_path(),
                                      config.black_list_file())
     to_file = '%s/%s' % (self.folder, config.black_list_file())
     self._copy_file(from_file, to_file)
Beispiel #4
0
 def _copy_black_list(self):
    from_file = '%s/memoizeit/%s' % (commons.general_path(), config.black_list_file())
    to_file = '%s/%s' % (self.folder, config.black_list_file())
    self._copy_file(from_file, to_file)