Unit test for pacman_cache()
(self)
| 767 | |
| 768 | @common.skipIfWindows |
| 769 | def test_pacman_cache(self): |
| 770 | """Unit test for pacman_cache()""" |
| 771 | if 0 != os.geteuid() or os.path.exists('/var/lib/pacman/db.lck') \ |
| 772 | or not exe_exists('paccache'): |
| 773 | self.assertRaises(RuntimeError, pacman_cache) |
| 774 | else: |
| 775 | bytes_freed = pacman_cache() |
| 776 | self.assertIsInteger(bytes_freed) |
| 777 | logger.debug('pacman bytes cleaned %d', bytes_freed) |
| 778 | |
| 779 | @common.skipIfWindows |
| 780 | @mock.patch('bleachbit.Unix.General.run_external') |
nothing calls this directly
no test coverage detected