Server IP : 184.154.167.98 / Your IP : 18.119.164.231 Web Server : Apache System : Linux pink.dnsnetservice.com 4.18.0-553.22.1.lve.1.el8.x86_64 #1 SMP Tue Oct 8 15:52:54 UTC 2024 x86_64 User : puertode ( 1767) PHP Version : 8.2.26 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /lib/python3.6/site-packages/tracer/tests/ |
Upload File : |
from .__meta__ import * try: from tracer.packageManagers.ipackageManager import IPackageManager from tracer.packageManagers.dnf import Dnf except ImportError: pass @unittest.skipIf((DISTRO != 'fedora') and (DISTRO != 'mageia'), "Skipping tests because they are distro-specific") class TestDnf(unittest.TestCase): def setUp(self): self.manager = Dnf() def test_implements_package_manager_interface(self): self.assertIsInstance(self.manager, IPackageManager, "Every package manager should inherit from IPackageManager") def test_package_newer_than_implemented(self): try: self.manager.packages_newer_than(0) except NotImplementedError: self.fail("packages_newer_than() is not implemented!") except Exception: pass def test_load_package_info(self): try: self.manager.load_package_info("") except NotImplementedError: self.fail("load_package_info() is not implemented!") except Exception: pass def test_package_files_implemented(self): try: self.manager.package_files("") except NotImplementedError: self.fail("packages_files() is not implemented!") except Exception: pass def test_provided_by(self): try: self.manager.provided_by("") except NotImplementedError: self.fail("provided_by() is not implemented!") except Exception: pass if __name__ == '__main__': unittest.main()