Esempio n. 1
0
    def test_install_and_list(self):
        """Verify the correct dependencies are installed."""
        config = Config(FILES)

        count = config.install_dependencies()
        assert 7 == count

        deps = list(config.get_dependencies())
        assert 7 == len(deps)
        assert '1de84ca1d315f81b035cd7b0ecf87ca2025cdacd' == deps[0][2]
        assert '050290bca3f14e13fd616604202b579853e7bfb0' == deps[1][2]
        assert 'fb693447579235391a45ca170959b5583c5042d8' == deps[2][2]
        # master branch always changes --------------------- deps[3][2]
        # master branch always changes --------------------- deps[4][2]
        assert '7bd138fe7359561a8c2ff9d195dff238794ccc04' == deps[5][2]
        assert '2da24fca34af3748e3cab61db81a2ae8b35aec94' == deps[6][2]

        assert 5 == len(list(config.get_dependencies(depth=2)))

        assert 3 == len(list(config.get_dependencies(depth=1)))

        assert 0 == len(list(config.get_dependencies(depth=0)))
Esempio n. 2
0
    def test_install_with_depth_2(self):
        """Verify an install depth of 2 installs 1 level of nesting."""
        config = Config(FILES)

        count = config.install_dependencies(depth=2)
        assert 5 == count
Esempio n. 3
0
    def test_install_with_depth_1(self):
        """Verify an install depth of 1 installs the direct dependencies."""
        config = Config(FILES)

        count = config.install_dependencies(depth=1)
        assert 3 == count
Esempio n. 4
0
    def test_install_with_depth_0(self):
        """Verify an install depth of 0 installs nothing."""
        config = Config(FILES)

        count = config.install_dependencies(depth=0)
        assert 0 == count
Esempio n. 5
0
    def test_install_with_dirs_unknown(self):
        """Verify zero dependencies are installed with unknown dependency."""
        config = Config(FILES)

        count = config.install_dependencies('foobar')
        assert 0 == count
Esempio n. 6
0
    def test_install_with_dirs(self):
        """Verify the dependency list can be filtered."""
        config = Config(FILES)

        count = config.install_dependencies('gitman_2', 'gitman_3')
        assert 2 == count