コード例 #1
0
    def test_should_return_local_archive_type_when_archive_exists(
            self, _, __, ___):
        path_str = "/home/usr/some/path.zip"

        path_type = PathParser.parse_path(path_str)

        assert path_type == PathParser.LOCAL_FILE
コード例 #2
0
    def test_should_return_git_url_type_when_git_http_url_was_given(
            self, _, __, ___):
        path_str = "https://github.com/Paperspace/gradient-cli.git"

        path_type = PathParser.parse_path(path_str)

        assert path_type == PathParser.GIT_URL
コード例 #3
0
    def test_should_return_local_dir_type_when_given_directory_exists(
            self, _, __):
        path_str = "/home/usr/some/path"

        path_type = PathParser.parse_path(path_str)

        assert path_type == PathParser.LOCAL_DIR