Skip to content

Commit

Permalink
Merge pull request #1128 from lsst/tickets/DM-47325-hotfix
Browse files Browse the repository at this point in the history
DM-47325: (hotfix) URL quote the config directory for URI test
  • Loading branch information
ktlim authored Dec 6, 2024
2 parents d66c8bb + 60cf16e commit 0155486
Showing 1 changed file with 4 additions and 2 deletions.
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

0 comments on commit 0155486

Please sign in to comment.