def run(self): """ This function is responsible for running the main treatment on files. It is the processing thread. This function successively tests the files to delete, mark duplicates and sends the processed data to the interface through personalized transmitted signal. """ while self.exiting is False: dupli = Duplicate(source=self.spath, destination=self.dpath, extension=self.exten, typehash=self.thash) for line in dupli.run(): # Le générateur self.signal.datasig.emit(line) self.exiting = True # Quand le travail est terminé, on sort.
def test_hash(): d = Duplicate(source=".", destination="", extension="", typehash="sha1") m = "11CB722298C5535ABEA111C650308969A38492BC" assert d.hashf("iconapp.png", "sha1") == m