Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[MAINTENANCE] Added unit-test for rule based algorithm #112

Merged
merged 10 commits into from
Aug 15, 2023
Prev Previous commit
Next Next commit
try to use ephemeral data context
  • Loading branch information
bvolodarskiy committed Aug 2, 2023

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
commit 026c149a723f629b931adc339739c5cda2c15844
7 changes: 5 additions & 2 deletions functions/data_test/tests/test_profiling.py
Original file line number Diff line number Diff line change
@@ -13,8 +13,10 @@
expectations_quantile,
calculate_q_ranges,
calculate_median,
expectations_median)
expectations_median,
change_ge_config)
import great_expectations as gx
from great_expectations.data_context import EphemeralDataContext
import pandas as pd
from datetime import datetime

@@ -102,7 +104,8 @@ def change_template(params, params_name):
def before_and_after_test():

bvolodarskiy marked this conversation as resolved.
Show resolved Hide resolved
df = pd.DataFrame(columns=['PassengerId'])
context_gx = gx.get_context()
config = change_ge_config("test")
context_gx = EphemeralDataContext(project_config=config)
suite_name = f"test_{datetime.now()}"
datasource = context_gx.sources.add_pandas(name=suite_name)
data_asset = datasource.add_dataframe_asset(name=suite_name, dataframe=df)