Unit test for class DeepScan. Preview real files.
(self)
| 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""" |
nothing calls this directly
no test coverage detected