MCPcopy Create free account
hub / github.com/bleachbit/bleachbit / test_DeepScan

Method test_DeepScan

tests/TestDeepScan.py:65–76  ·  view source on GitHub ↗

Unit test for class DeepScan. Preview real files.

(self)

Source from the content-addressed store, hash-verified

63 self._test_encoding(test)
64
65 def test_DeepScan(self):
66 """Unit test for class DeepScan. Preview real files."""
67 path = os.path.expanduser('~')
68 searches = {path: []}
69 for regex in ('^Makefile$', '~$', 'bak$', '^Thumbs.db$', '^Thumbs.db:encryptable$'):
70 searches[path].append(Search(command='delete', regex=regex))
71 ds = DeepScan(searches)
72 for cmd in ds.scan():
73 if True == cmd:
74 # it's yielding control to the GTK idle loop
75 continue
76 self.assertLExists(cmd.path)
77
78 def _test_delete(self, command):
79 """Delete files in a test environment"""

Callers

nothing calls this directly

Calls 3

scanMethod · 0.95
DeepScanClass · 0.90
assertLExistsMethod · 0.80

Tested by

no test coverage detected