Skip to content

Commit

Permalink
Update generate snapshot script with new test setup.
Browse files Browse the repository at this point in the history
  • Loading branch information
plypaul committed Jul 27, 2023
1 parent 98a3e4a commit 1c7ba55
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion metricflow/test/generate_snapshots.py
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,13 @@ def run_tests(test_configuration: MetricFlowTestConfiguration, test_file_paths:
or test_configuration.engine is SqlEngine.DATABRICKS
or test_configuration.engine is SqlEngine.POSTGRES
):
run_command(f"pytest -x -vv -n 4 --overwrite-snapshots --use-persistent-source-schema {combined_paths}")
engine_name = test_configuration.engine.value.lower()
os.environ["MF_TEST_ADAPTER_TYPE"] = engine_name
hatch_env = f"{engine_name}-env"
run_command(
f"hatch -v run {hatch_env}:pytest -x -vv -n 4 "
f"--overwrite-snapshots --use-persistent-source-schema {combined_paths}"
)
else:
assert_values_exhausted(test_configuration.engine)

Expand Down

0 comments on commit 1c7ba55

Please sign in to comment.