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 26, 2024
1 parent 39470f3 commit f3940cd
Showing 1 changed file with 11 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,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 @@ -140,7 +144,7 @@ def my_asset(
"--job-name",
context.run.job_name,
"--test-name",
request.node.name,
_get_current_test_name(request),
]

if isinstance(context_injector, PipesS3ContextInjector):
Expand Down Expand Up @@ -202,7 +206,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 @@ -257,7 +261,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 @@ -322,7 +326,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 @@ -395,7 +399,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 @@ -469,7 +473,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 @@ -562,7 +566,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 f3940cd

Please sign in to comment.