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

Method test_apt

tests/TestUnix.py:96–107  ·  view source on GitHub ↗

Unit test for method apt_autoclean() and apt_autoremove()

(self)

Source from the content-addressed store, hash-verified

94
95 @common.skipIfWindows
96 def test_apt(self):
97 """Unit test for method apt_autoclean() and apt_autoremove()"""
98 if 0 != os.geteuid() or not exe_exists('apt-get'):
99 self.assertRaises(RuntimeError, apt_autoclean)
100 self.assertRaises(RuntimeError, apt_autoremove)
101 else:
102 bytes_freed = apt_autoclean()
103 self.assertIsInteger(bytes_freed)
104 logger.debug('apt bytes cleaned %d', bytes_freed)
105 bytes_freed = apt_autoremove()
106 self.assertIsInteger(bytes_freed)
107 logger.debug('apt bytes cleaned %d', bytes_freed)
108
109 @common.skipIfWindows
110 def test_find_available_locales(self):

Callers

nothing calls this directly

Calls 4

exe_existsFunction · 0.90
apt_autocleanFunction · 0.90
apt_autoremoveFunction · 0.90
assertIsIntegerMethod · 0.80

Tested by

no test coverage detected