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

Method test_dnf_autoremove_real

tests/TestUnix.py:733–741  ·  view source on GitHub ↗

Unit test for dnf_autoremove() with real dnf

(self)

Source from the content-addressed store, hash-verified

731
732 @common.skipIfWindows
733 def test_dnf_autoremove_real(self):
734 """Unit test for dnf_autoremove() with real dnf"""
735 if 0 != os.geteuid() or os.path.exists('/var/run/dnf.pid') \
736 or not exe_exists('dnf'):
737 self.assertRaises(RuntimeError, dnf_clean)
738 else:
739 bytes_freed = dnf_autoremove()
740 self.assertIsInteger(bytes_freed)
741 logger.debug('dnf bytes cleaned %d', bytes_freed)
742
743 @common.skipIfWindows
744 @mock.patch('bleachbit.Language.setup_translation')

Callers

nothing calls this directly

Calls 3

exe_existsFunction · 0.90
dnf_autoremoveFunction · 0.90
assertIsIntegerMethod · 0.80

Tested by

no test coverage detected