예제 #1
0
def test_external_partition_names_error_grpc():
    with get_bar_repo_handle() as repository_handle:
        with pytest.raises(DagsterUserCodeProcessError, match="womp womp"):
            sync_get_external_partition_names_grpc(
                repository_handle.repository_location.client,
                repository_handle,
                "error_partitions",
            )
def test_external_partition_names_error_grpc(instance):
    with get_bar_repo_repository_location(instance) as repository_location:
        repository_handle = repository_location.get_repository(
            "bar_repo").handle

        with pytest.raises(DagsterUserCodeProcessError, match="womp womp"):
            sync_get_external_partition_names_grpc(
                repository_location.client,
                repository_handle,
                "error_partitions",
            )
예제 #3
0
    def get_external_partition_names(self, repository_handle, partition_set_name):
        check.inst_param(repository_handle, "repository_handle", RepositoryHandle)
        check.str_param(partition_set_name, "partition_set_name")

        return sync_get_external_partition_names_grpc(
            self._handle.client, repository_handle, partition_set_name
        )
예제 #4
0
def test_external_partition_names_grpc():
    with get_bar_repo_handle() as repository_handle:
        data = sync_get_external_partition_names_grpc(
            repository_handle.repository_location.client, repository_handle, "baz_partitions"
        )
        assert isinstance(data, ExternalPartitionNamesData)
        assert data.partition_names == list(string.ascii_lowercase)
def test_external_partition_names_error_grpc():
    repository_handle = get_bar_grpc_repo_handle()

    error = sync_get_external_partition_names_grpc(
        repository_handle.repository_location_handle.client, repository_handle,
        'error_partitions')
    assert isinstance(error, ExternalPartitionExecutionErrorData)
    assert 'womp womp' in error.error.to_string()
예제 #6
0
    def get_external_partition_names(
        self, repository_handle: RepositoryHandle, partition_set_name: str
    ) -> "ExternalPartitionNamesData":
        check.inst_param(repository_handle, "repository_handle", RepositoryHandle)
        check.str_param(partition_set_name, "partition_set_name")

        return sync_get_external_partition_names_grpc(
            self.client, repository_handle, partition_set_name
        )
예제 #7
0
def test_external_partition_names_error_grpc():
    with get_bar_grpc_repo_handle() as repository_handle:
        error = sync_get_external_partition_names_grpc(
            repository_handle.repository_location_handle.client,
            repository_handle,
            "error_partitions",
        )
        assert isinstance(error, ExternalPartitionExecutionErrorData)
        assert "womp womp" in error.error.to_string()
def test_external_partition_names_grpc():
    repository_handle = get_bar_repo_handle()
    data = sync_get_external_partition_names_grpc(repository_handle,
                                                  'baz_partitions')
    assert isinstance(data, ExternalPartitionNamesData)
    assert data.partition_names == list(string.ascii_lowercase)