Exemplo n.º 1
0
    def test_simple_provided(self):
        r_operations = [Install(nomkl_numpy_1_7_0), Install(scipy_0_11_0)]
        repo = Repository([mkl_11_0_0, scipy_0_11_0, nomkl_numpy_1_7_0])

        pool = Pool()
        pool.add_repository(repo)

        installed_repo = Repository()

        operations = solve(pool, R("scipy"), installed_repo, policy)
        self.assertEqual(operations, r_operations)
Exemplo n.º 2
0
    def test_simple(self):
        """Numpy depends on MKL, one version of NumPy only."""
        repo = Repository([mkl_10_2_0, mkl_10_3_0, mkl_11_0_0, numpy_1_6_0])

        pool = Pool()
        pool.add_repository(repo)

        installed_repo = Repository()

        operations = solve(pool, R("numpy"), installed_repo, policy)
        self.assertEqual(operations, [Install(mkl_11_0_0), Install(numpy_1_6_0)])
Exemplo n.º 3
0
    def test_simple2(self):
        """Numpy depends on MKL, ensure we install the most up-to-date version."""
        repo = Repository([mkl_10_2_0, mkl_10_3_0, mkl_11_0_0, numpy_1_6_0, numpy_1_7_0])

        pool = Pool()
        pool.add_repository(repo)

        installed_repo = Repository()

        operations = solve(pool, R("numpy"), installed_repo, policy)
        self.assertEqual(operations, [Install(mkl_11_0_0), Install(numpy_1_7_0)])
Exemplo n.º 4
0
    def test_simple(self):
        r_operations = [Install(mkl_11_0_0), Install(numpy_1_7_0),
                Install(scipy_0_12_0)]

        repo = Repository([mkl_10_3_0, mkl_11_0_0, numpy_1_6_0, numpy_1_6_1,
                           numpy_1_7_0, scipy_0_12_0])

        pool = Pool()
        pool.add_repository(repo)

        installed_repo = Repository()

        req = R("scipy")

        operations = solve(pool, req, installed_repo, policy)
        self.assertEqual(operations, r_operations)
Exemplo n.º 5
0
    def test_no_install(self):
        """Ensure the most up-to-date version is installed when directly installed."""
        repo = Repository([mkl_10_1_0, mkl_10_2_0, mkl_10_3_0, mkl_11_0_0])

        pool = Pool()
        pool.add_repository(repo)

        installed_repo = Repository()

        operations = solve(pool, R("mkl"), installed_repo, policy)
        self.assertEqual(operations, [Install(mkl_11_0_0)])
Exemplo n.º 6
0
    def test_dependency_already_provided_but_older(self):
        """Numpy depends on MKL, older MKL already installed."""
        repo = Repository([mkl_10_2_0, mkl_10_3_0, mkl_11_0_0, numpy_1_6_0, numpy_1_7_0])

        pool = Pool()
        pool.add_repository(repo)

        installed_repo = Repository([mkl_10_3_0])

        operations = solve(pool, R("numpy"), installed_repo, policy)
        self.assertEqual(operations, [Install(numpy_1_7_0)])