Skip to content

Commit c2912f8

Browse files
Small fix for Windows paths
1 parent 70f399c commit c2912f8

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

test/unit/test_connection.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -661,6 +661,9 @@ def test_toml_connection_params_are_plumbed_into_authbyworkloadidentity(
661661
monkeypatch, tmp_path
662662
):
663663
token_file = write_temp_file(tmp_path / "token.txt", contents="my_token")
664+
# On Windows, this path includes backslashes which will result in errors while parsing the TOML.
665+
# Escape the backslashes to ensure it parses correctly.
666+
token_file_path_escaped = str(token_file).replace("\\", "\\\\")
664667
connections_file = write_temp_file(
665668
tmp_path / "connections.toml",
666669
contents=dedent(
@@ -670,7 +673,7 @@ def test_toml_connection_params_are_plumbed_into_authbyworkloadidentity(
670673
authenticator = "WORKLOAD_IDENTITY"
671674
workload_identity_provider = "OIDC"
672675
workload_identity_entra_resource = "api://0b2f151f-09a2-46eb-ad5a-39d5ebef917b"
673-
token_file_path = "{token_file}"
676+
token_file_path = "{token_file_path_escaped}"
674677
"""
675678
),
676679
)

0 commit comments

Comments
 (0)