From 808ac018d8f4e61fba453a48ea50f72675528736 Mon Sep 17 00:00:00 2001 From: Didier Raboud Date: Fri, 25 Nov 2016 15:39:38 +0100 Subject: [PATCH] Test the distro-info non-Debian fallback, to fix #845489 --- test/test_lsb_release.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/test/test_lsb_release.py b/test/test_lsb_release.py index 936af90..082bea3 100644 --- a/test/test_lsb_release.py +++ b/test/test_lsb_release.py @@ -288,6 +288,13 @@ class TestLSBRelease(unittest.TestCase): self.assertEqual(lr.get_lsb_information(),supposed_output) os.environ.pop('LSB_ETC_LSB_RELEASE') + def test_get_distro_information_no_distinfo_file(self): + # Test that a missing /usr/share/distro-info/{distro}.csv indeed falls + # back on Debian's information + debian_info = lr.get_distro_info() + other_distro_info = lr.get_distro_info(origin='x-not-debian') + self.assertEqual(debian_info, other_distro_info) + def test_get_distro_information(self): # Test that an inexistant /etc/lsb-release leads to empty output supposed_output = get_arch_distinfo() -- 2.30.2