示例#1
0
 def test_debian_like(self):
     self.assertTrue(Distro.DEBIAN10.is_debian10)
     distro = Distro.from_os_release(DISTROS_OS_RELEASE["Debian 10"])
     invalid_distro = Distro.from_os_release(
         DISTROS_OS_RELEASE["Amazon Linux 2"])
     self.assertTrue(distro.is_debian_like)
     self.assertFalse(invalid_distro.is_debian_like)
示例#2
0
 def test_ubuntu20(self):
     self.assertTrue(Distro.UBUNTU20.is_ubuntu20)
     distro = Distro.from_os_release(DISTROS_OS_RELEASE["Ubuntu 20.04"])
     self.assertTrue(distro.is_ubuntu20)
     self.assertTrue(distro.is_ubuntu)
示例#3
0
 def test_amazon2(self):
     self.assertTrue(Distro.AMAZON2.is_amazon2)
     distro = Distro.from_os_release(DISTROS_OS_RELEASE["Amazon Linux 2"])
     self.assertTrue(distro.is_amazon2)
     self.assertTrue(distro.is_rhel_like)
示例#4
0
 def test_rhel7(self):
     self.assertTrue(Distro.RHEL7.is_rhel7)
     distro = Distro.from_os_release(DISTROS_OS_RELEASE["RHEL 7"])
     self.assertTrue(distro.is_rhel7)
     self.assertTrue(distro.is_rhel_like)
示例#5
0
 def test_oel8(self):
     self.assertTrue(Distro.OEL8.is_oel8)
     distro = Distro.from_os_release(DISTROS_OS_RELEASE["OEL 8.1"])
     self.assertTrue(distro.is_oel8)
     self.assertTrue(distro.is_rhel_like)
示例#6
0
 def test_centos8(self):
     self.assertTrue(Distro.CENTOS8.is_centos8)
     distro = Distro.from_os_release(DISTROS_OS_RELEASE["CentOS 8"])
     self.assertTrue(distro.is_centos8)
     self.assertTrue(distro.is_rhel_like)
示例#7
0
 def test_debian10(self):
     self.assertTrue(Distro.DEBIAN10.is_debian10)
     distro = Distro.from_os_release(DISTROS_OS_RELEASE["Debian 10"])
     self.assertTrue(distro.is_debian10)
     self.assertTrue(distro.is_debian)
示例#8
0
 def test_unknown(self):
     self.assertTrue(Distro.UNKNOWN.is_unknown)
     distro = Distro.from_os_release(DISTROS_OS_RELEASE["Unknown"])
     self.assertTrue(distro.is_unknown)
 def test_rocky8(self):
     self.assertTrue(Distro.ROCKY8.is_rocky8)
     distro = Distro.from_os_release(DISTROS_OS_RELEASE["Rocky Linux 8"])
     self.assertTrue(distro.is_rocky8)
     self.assertTrue(distro.is_rhel_like)
 def test_sles15(self):
     self.assertTrue(Distro.SLES15.is_sles15)
     distro = Distro.from_os_release(DISTROS_OS_RELEASE["SLES 15"])
     self.assertTrue(distro.is_sles15)
     self.assertTrue(distro.is_sles)