Skip to content

Commit 73628de

Browse files
authored
Fail if test dir doesn't exist (#2233)
1 parent ba19c03 commit 73628de

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

tests/hierarchy/images_hierarchy.py

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

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

33-
test_dirs = get_test_dirs(ALL_IMAGES[short_image_name])
34-
if (
35-
current_image_tests_dir := IMAGE_SPECIFIC_TESTS_DIR / short_image_name
36-
).exists():
37-
test_dirs.append(current_image_tests_dir)
33+
test_dirs = get_test_dirs(_IMAGE_PARENT[short_image_name])
34+
current_test_dir = IMAGE_SPECIFIC_TESTS_DIR / short_image_name
35+
assert current_test_dir.exists(), f"{current_test_dir} does not exist."
36+
test_dirs.append(current_test_dir)
3837
return test_dirs

0 commit comments

Comments
 (0)