def test_parse_information(self): """test the parse_information function for all version_strings""" for vs, info in version_strings.items(): evr = (info['epoch'], info['version'], info['release']) parsed = rpm.parse_package(vs) self.assertEqual(info['name'], parsed['name']) self.assertEqual(evr, parsed['EVR']) self.assertEqual(info['arch'], parsed['arch'])
def test_parse_information(version_info): """test the parse_information function for all version_info""" vs, info = version_info evr = (info['epoch'], info['version'], info['release']) parsed = rpm.parse_package(vs) assert info['name'] == parsed['name'] assert evr == parsed['EVR'] assert info['arch'] == parsed['arch']
def test_parse_package_bad_package(): """Test that an unparseable package raises an error""" with pytest.raises(errors.RpmError): rpm.parse_package('blargleblargle.aiiii')
def test_parse_package_bad_package_no_arch(): """Test that a package with no architecture raises an error""" with pytest.raises(errors.RpmError): rpm.parse_package('what_even_is_this_thing')
def test_parse_package_bad_package(self): with self.assertRaises(errors.RpmError): rpm.parse_package('blargleblargle.aiiii')
def test_parse_package_bad_package_no_arch(self): with self.assertRaises(errors.RpmError): rpm.parse_package('what_even_is_this_thing')