Skip to content

Commit

Permalink
Resolve warnings and errors
Browse files Browse the repository at this point in the history
  • Loading branch information
abegong committed Apr 6, 2022
1 parent 38938dd commit 69e1fd7
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion great_expectations/data_context/data_context.py
Expand Up @@ -1436,7 +1436,7 @@ def _get_batch_v3(
# NOTE: Alex 20201202 - The check below is duplicate of code in Datasource.get_single_batch_from_batch_request()
# deprecated-v0.13.20
warnings.warn(
"get_batch is deprecated for the V3 Batch Request API as of v0.13.20 and will be removed in v0.16. Please use"
"get_batch is deprecated for the V3 Batch Request API as of v0.13.20 and will be removed in v0.16. Please use "
"get_batch_list instead.",
DeprecationWarning,
)
Expand Down
16 changes: 8 additions & 8 deletions tests/data_context/test_data_context.py
Expand Up @@ -1792,7 +1792,7 @@ def test_get_validator_with_attach_expectation_suite(
def test_get_validator_without_expectation_suite(in_memory_runtime_context):
context = in_memory_runtime_context

batch = context.get_batch(
batch = context.get_batch_list(
batch_request=RuntimeBatchRequest(
datasource_name="pandas_datasource",
data_connector_name="runtime_data_connector",
Expand All @@ -1803,7 +1803,7 @@ def test_get_validator_without_expectation_suite(in_memory_runtime_context):
"id_key_1": "id_1_value_a",
},
)
)
)[0]

my_validator = context.get_validator(batch=batch)
assert isinstance(my_validator.get_expectation_suite(), ExpectationSuite)
Expand All @@ -1813,7 +1813,7 @@ def test_get_validator_without_expectation_suite(in_memory_runtime_context):
def test_get_validator_with_batch(in_memory_runtime_context):
context = in_memory_runtime_context

my_batch = context.get_batch(
my_batch = context.get_batch_list(
batch_request=RuntimeBatchRequest(
datasource_name="pandas_datasource",
data_connector_name="runtime_data_connector",
Expand All @@ -1824,7 +1824,7 @@ def test_get_validator_with_batch(in_memory_runtime_context):
"id_key_1": "id_1_value_a",
},
)
)
)[0]

my_validator = context.get_validator(
batch=my_batch,
Expand All @@ -1836,7 +1836,7 @@ def test_get_validator_with_batch_list(in_memory_runtime_context):
context = in_memory_runtime_context

my_batch_list = [
context.get_batch(
context.get_batch_list(
batch_request=RuntimeBatchRequest(
datasource_name="pandas_datasource",
data_connector_name="runtime_data_connector",
Expand All @@ -1847,8 +1847,8 @@ def test_get_validator_with_batch_list(in_memory_runtime_context):
"id_key_1": "id_1_value_a",
},
)
),
context.get_batch(
)[0],
context.get_batch_list(
batch_request=RuntimeBatchRequest(
datasource_name="pandas_datasource",
data_connector_name="runtime_data_connector",
Expand All @@ -1859,7 +1859,7 @@ def test_get_validator_with_batch_list(in_memory_runtime_context):
"id_key_1": "id_1_value_b",
},
)
),
)[0],
]

my_validator = context.get_validator(
Expand Down
2 changes: 1 addition & 1 deletion tests/validator/test_validator.py
Expand Up @@ -1106,7 +1106,7 @@ def test_instantiate_validator_with_a_list_of_batch_requests(
expectation_suite=suite,
)
assert ve.value.args == (
"Only one of batch_request or batch_request_list may be specified",
"No more than one of batch, batch_list, batch_request, or batch_request_list can be specified",
)


Expand Down

0 comments on commit 69e1fd7

Please sign in to comment.