def test_to_dependencies(self): """Test to_dependencies function.""" self.assertEqual(to_dependencies([]), []) deps = [ 'foo/1.2.3', ('foo', '1.2.3'), ('bar', '4.5.6', '-test'), ('foobar', '1.3.5', '', ('GCC', '4.7.2')), {'toy': '0.0'}, {'toy': '0.0', 'versionsuffix': '-bleh'}, {'toy': '0.0', 'toolchain': 'gompi, 2015a'}, {'gzip': '1.5', 'versionsuffix': '', 'toolchain': 'foss, 2014b'}, {'name': 'toy', 'version': '0.0', 'versionsuffix': '-bleh', 'toolchain': {'name': 'gompi', 'version': '2015a'}}, ] self.assertEqual(to_dependencies(deps), [ 'foo/1.2.3', ('foo', '1.2.3'), ('bar', '4.5.6', '-test'), ('foobar', '1.3.5', '', ('GCC','4.7.2')), {'name': 'toy', 'version': '0.0'}, {'name': 'toy', 'version': '0.0', 'versionsuffix': '-bleh'}, {'name': 'toy', 'version': '0.0', 'toolchain': {'name': 'gompi', 'version': '2015a'}}, {'name': 'gzip', 'version': '1.5', 'versionsuffix': '', 'toolchain': {'name': 'foss', 'version': '2014b'}}, {'name': 'toy', 'version': '0.0', 'versionsuffix': '-bleh', 'toolchain': {'name': 'gompi', 'version': '2015a'}}, ])
def test_to_dependencies(self): """Test to_dependencies function.""" self.assertEqual(to_dependencies([]), []) deps = [ 'foo/1.2.3', ('foo', '1.2.3'), ('bar', '4.5.6', '-test'), ('foobar', '1.3.5', '', ('GCC', '4.7.2')), {'toy': '0.0'}, {'toy': '0.0', 'versionsuffix': '-bleh'}, {'toy': '0.0', 'toolchain': 'gompi, 2015a'}, {'gzip': '1.5', 'versionsuffix': '', 'toolchain': 'foss, 2014b'}, {'name': 'toy', 'version': '0.0', 'versionsuffix': '-bleh', 'toolchain': {'name': 'gompi', 'version': '2015a'}}, ] self.assertEqual(to_dependencies(deps), [ 'foo/1.2.3', ('foo', '1.2.3'), ('bar', '4.5.6', '-test'), ('foobar', '1.3.5', '', ('GCC', '4.7.2')), {'name': 'toy', 'version': '0.0'}, {'name': 'toy', 'version': '0.0', 'versionsuffix': '-bleh'}, {'name': 'toy', 'version': '0.0', 'toolchain': {'name': 'gompi', 'version': '2015a'}}, {'name': 'gzip', 'version': '1.5', 'versionsuffix': '', 'toolchain': {'name': 'foss', 'version': '2014b'}}, {'name': 'toy', 'version': '0.0', 'versionsuffix': '-bleh', 'toolchain': {'name': 'gompi', 'version': '2015a'}}, ])