Skip to content

Commit

Permalink
Fail if test dir doesn't exist (#2233)
Browse files Browse the repository at this point in the history
  • Loading branch information
mathbunnyru authored Feb 21, 2025
1 parent ba19c03 commit 73628de
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions tests/hierarchy/images_hierarchy.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

# Please, take a look at the hierarchy of the images here:
# https://jupyter-docker-stacks.readthedocs.io/en/latest/using/selecting.html#image-relationships
ALL_IMAGES = {
_IMAGE_PARENT = {
"docker-stacks-foundation": None,
"base-notebook": "docker-stacks-foundation",
"minimal-notebook": "base-notebook",
Expand All @@ -30,9 +30,8 @@ def get_test_dirs(
if short_image_name is None:
return []

test_dirs = get_test_dirs(ALL_IMAGES[short_image_name])
if (
current_image_tests_dir := IMAGE_SPECIFIC_TESTS_DIR / short_image_name
).exists():
test_dirs.append(current_image_tests_dir)
test_dirs = get_test_dirs(_IMAGE_PARENT[short_image_name])
current_test_dir = IMAGE_SPECIFIC_TESTS_DIR / short_image_name
assert current_test_dir.exists(), f"{current_test_dir} does not exist."
test_dirs.append(current_test_dir)
return test_dirs

0 comments on commit 73628de

Please sign in to comment.