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

Method test_dnf_clean

tests/TestUnix.py:722–730  ·  view source on GitHub ↗

Unit test for dnf_clean()

(self)

Source from the content-addressed store, hash-verified

720
721 @common.skipIfWindows
722 def test_dnf_clean(self):
723 """Unit test for dnf_clean()"""
724 if 0 != os.geteuid() or os.path.exists('/var/run/dnf.pid') \
725 or not exe_exists('dnf'):
726 self.assertRaises(RuntimeError, dnf_clean)
727 else:
728 bytes_freed = dnf_clean()
729 self.assertIsInteger(bytes_freed)
730 logger.debug('dnf bytes cleaned %d', bytes_freed)
731
732 @common.skipIfWindows
733 def test_dnf_autoremove_real(self):

Callers

nothing calls this directly

Calls 3

exe_existsFunction · 0.90
dnf_cleanFunction · 0.90
assertIsIntegerMethod · 0.80

Tested by

no test coverage detected