diff --git a/bindep/depends.py b/bindep/depends.py index 2066d41..0ad3c86 100644 --- a/bindep/depends.py +++ b/bindep/depends.py @@ -323,7 +323,7 @@ class Depends(object): "redhatenterpriseserver", "redhatenterpriseworkstation", "fedora", - "opensuseproject", "opensuse", + "opensuseproject", "opensuse", "opensuse-leap", "opensuse-tumbleweed", "sles", "suselinux"]: # Distro aliases if distro_id in ["redhatenterpriseserver", diff --git a/bindep/tests/fixtures/opensuseleap15/etc/os-release b/bindep/tests/fixtures/opensuseleap15/etc/os-release new file mode 100644 index 0000000..a519419 --- /dev/null +++ b/bindep/tests/fixtures/opensuseleap15/etc/os-release @@ -0,0 +1,10 @@ +NAME="openSUSE Leap" +VERSION="15.0" +ID="opensuse-leap" +ID_LIKE="suse opensuse" +VERSION_ID="15.0" +PRETTY_NAME="openSUSE Leap 15.0" +ANSI_COLOR="0;32" +CPE_NAME="cpe:/o:opensuse:leap:15.0" +BUG_REPORT_URL="https://bugs.opensuse.org" +HOME_URL="https://www.opensuse.org/" diff --git a/bindep/tests/test_depends.py b/bindep/tests/test_depends.py index a737ac2..64fc7cd 100644 --- a/bindep/tests/test_depends.py +++ b/bindep/tests/test_depends.py @@ -183,6 +183,15 @@ class TestDepends(TestCase): self.assertThat(platform_profiles, Contains("platform:suse")) + def test_detects_opensuse_leap15(self): + with DistroFixture("openSUSEleap15"): + depends = Depends("") + platform_profiles = depends.platform_profiles() + self.assertThat(platform_profiles, + Contains("platform:opensuse")) + self.assertThat(platform_profiles, + Contains("platform:suse")) + def test_detects_suse_linux(self): with DistroFixture("SLES"): depends = Depends("") @@ -256,6 +265,13 @@ class TestDepends(TestCase): depends.platform_profiles(), Contains("platform:rpm")) self.assertIsInstance(depends.platform, Rpm) + def test_opensuse_leap15_implies_rpm(self): + with DistroFixture("openSUSEleap15"): + depends = Depends("") + self.assertThat( + depends.platform_profiles(), Contains("platform:rpm")) + self.assertIsInstance(depends.platform, Rpm) + def test_suse_linux_implies_rpm(self): with DistroFixture("SLES"): depends = Depends("")