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

DM-47325: (hotfix) URL quote the config directory for URI test #1128

Merged
merged 1 commit into from
Dec 6, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions tests/test_simpleButler.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
import re
import tempfile
import unittest
import urllib.parse
from typing import Any

try:
Expand Down Expand Up @@ -899,8 +900,9 @@ def test_dataset_uris(self):
ref = butler.find_dataset("flat", detector=2, physical_filter="Cam1-G")
self.assertIsInstance(ref, DatasetRef)

# Get the butler root for the URI.
config_dir = butler._config["root"]
# Get the butler root for the URI. It does have to be encoded
# in case there are special characters in the path.
config_dir = urllib.parse.quote(butler._config["root"])

# Read it via a repo label and a path.
with tempfile.NamedTemporaryFile(mode="w", suffix=".yaml") as index_file:
Expand Down
Loading