Skip to content

Commit

Permalink
fix --test-name
Browse files Browse the repository at this point in the history
  • Loading branch information
danielgafni committed Dec 25, 2024
1 parent 292cc3e commit fbba3f7
Showing 1 changed file with 11 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,10 @@
METADATA = json.loads(METADATA_PATH.read_text())



def _get_current_test_name(request):
return request.node.name.split("[")[0]

def _resolve_metadata_value(
value: Any, metadata_type: PipesMetadataType
) -> MetadataValue:
Expand Down Expand Up @@ -139,7 +143,7 @@ def my_asset(
"--job-name",
context.dagster_run.job_name,
"--test-name",
request.node.name,
_get_current_test_name(request),
]

if isinstance(context_injector, PipesS3ContextInjector):
Expand Down Expand Up @@ -201,7 +205,7 @@ def my_asset(
"--extras",
metadata_path,
"--test-name",
request.node.name,
_get_current_test_name(request),
]

invocation_result = pipes_subprocess_client.run(
Expand Down Expand Up @@ -256,7 +260,7 @@ def my_asset(
):
args = self.BASE_ARGS + [
"--test-name",
request.node.name,
_get_current_test_name(request),
]

invocation_result = pipes_subprocess_client.run(
Expand Down Expand Up @@ -321,7 +325,7 @@ def my_asset(
):
args = self.BASE_ARGS + [
"--test-name",
request.node.name,
_get_current_test_name(request),
]

invocation_result = pipes_subprocess_client.run(
Expand Down Expand Up @@ -394,7 +398,7 @@ def my_asset(
"--custom-payload",
str(custom_payload_path),
"--test-name",
request.node.name,
_get_current_test_name(request),
]

invocation_result = pipes_subprocess_client.run(
Expand Down Expand Up @@ -468,7 +472,7 @@ def my_asset(
"--report-asset-materialization",
str(asset_materialization_path),
"--test-name",
request.node.name,
_get_current_test_name(request),
]

invocation_result = pipes_subprocess_client.run(
Expand Down Expand Up @@ -561,7 +565,7 @@ def my_asset(
"--report-asset-check",
str(report_asset_check_path),
"--test-name",
request.node.name,
_get_current_test_name(request),
]

invocation_result = pipes_subprocess_client.run(
Expand Down

0 comments on commit fbba3f7

Please sign in to comment.