Exemplo n.º 1
0
    def test_simple_install(self):
        r_jobs = [
            _Job([self.scipy_0_12_0], "install", R("scipy")),
            _Job([self.numpy_1_7_0], "install", R("numpy")),
        ]

        request = Request(self.pool)
        request.install(R("scipy"))
        request.install(R("numpy"))

        self.assertEqual(request.jobs, r_jobs)
Exemplo n.º 2
0
    def test_simple_install(self):
        r_jobs = [
            _Job([self.scipy_0_12_0], "install", R("scipy")),
            _Job([self.numpy_1_7_0], "install", R("numpy")),
        ]

        request = Request(self.pool)
        request.install(R("scipy"))
        request.install(R("numpy"))

        self.assertEqual(request.jobs, r_jobs)
Exemplo n.º 3
0
    def test_simple_install(self):
        installed_packages = [P("mkl-11.0.0")]
        remote_packages = [P("mkl-11.0.0")]

        solver = self._create_solver(installed_packages, remote_packages)

        request = Request(solver.pool)
        request.install(R("mkl"))

        solver._compute_package_maps(request)
        self.assertEqual(solver._id_to_installed_package, {1: P("mkl-11.0.0")})
        self.assertEqual(solver._id_to_updated_state, {})
Exemplo n.º 4
0
    def test_simple_install(self):
        installed_packages = [P("mkl-11.0.0")]
        remote_packages = [P("mkl-11.0.0")]

        solver = self._create_solver(installed_packages, remote_packages)

        request = Request(solver.pool)
        request.install(R("mkl"))

        solver._compute_package_maps(request)
        self.assertEqual(solver._id_to_installed_package, {1: P("mkl-11.0.0")})
        self.assertEqual(solver._id_to_updated_state, {})
Exemplo n.º 5
0
    def test_create_depends_rule(self):
        r_rule = PackageRule.from_string(self.pool,
                    "-numpy-1.6.0 | mkl-10.1.0 | mkl-10.2.0 | mkl-10.3.0 | mkl-11.0.0",
                    None)

        req = R("numpy")
        request = Request(self.pool)
        request.install(req)

        rules_generator = RulesGenerator(self.pool, request, OrderedDict())
        dependencies = self.pool.what_provides(self.numpy_1_6_0.dependencies[0])
        rule = rules_generator._create_dependency_rule(self.numpy_1_6_0, dependencies, None)

        self.assertTrue(rule.is_equivalent(r_rule))
Exemplo n.º 6
0
    def test_create_depends_rule(self):
        r_rule = PackageRule.from_string(
            self.pool,
            "-numpy-1.6.0 | mkl-10.1.0 | mkl-10.2.0 | mkl-10.3.0 | mkl-11.0.0",
            None)

        req = R("numpy")
        request = Request(self.pool)
        request.install(req)

        rules_generator = RulesGenerator(self.pool, request, OrderedDict())
        dependencies = self.pool.what_provides(
            self.numpy_1_6_0.dependencies[0])
        rule = rules_generator._create_dependency_rule(self.numpy_1_6_0,
                                                       dependencies, None)

        self.assertTrue(rule.is_equivalent(r_rule))