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

Method test_pacman_cache

tests/TestUnix.py:769–777  ·  view source on GitHub ↗

Unit test for pacman_cache()

(self)

Source from the content-addressed store, hash-verified

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')

Callers

nothing calls this directly

Calls 3

exe_existsFunction · 0.90
pacman_cacheFunction · 0.90
assertIsIntegerMethod · 0.80

Tested by

no test coverage detected