def test_expand_dependencies(self):
        # Test dependency expansion of a recipe with no alternatives:
        expanded_result_1 = expand_dependencies(["pysdl2"], self.ctx)
        self.assertTrue({"sdl2", "pysdl2", "python3"} in
                        [set(s) for s in expanded_result_1])

        # Test expansion of a single element but as tuple:
        expanded_result_1 = expand_dependencies([("pysdl2", )], self.ctx)
        self.assertTrue({"sdl2", "pysdl2", "python3"} in
                        [set(s) for s in expanded_result_1])

        # Test all alternatives are listed (they won't have dependencies
        # expanded since expand_dependencies() is too simplistic):
        expanded_result_2 = expand_dependencies([("pysdl2", "kivy")], self.ctx)
        self.assertEqual([["pysdl2"], ["kivy"]], expanded_result_2)
 def test_expand_dependencies_with_pure_python_package(self):
     """Check that `expanded_dependencies`, with a pure python package as
     one of the dependencies, returns a list of dependencies
     """
     expanded_result = expand_dependencies(["python3", "kivy", "peewee"],
                                           self.ctx)
     # we expect to have two results (one for python2 and one for python3)
     self.assertEqual(len(expanded_result), 2)
     self.assertIsInstance(expanded_result, list)
     for i in expanded_result:
         self.assertIsInstance(i, list)