File tree Expand file tree Collapse file tree 4 files changed +24
-20
lines changed
image_specific_tests/docker-stacks-foundation Expand file tree Collapse file tree 4 files changed +24
-20
lines changed Original file line number Diff line number Diff line change
1
+ # Copyright (c) Jupyter Development Team.
2
+ # Distributed under the terms of the Modified BSD License.
3
+ from pathlib import Path
4
+
5
+ from tests .hierarchy .images_hierarchy import IMAGE_PARENT
6
+
7
+ THIS_DIR = Path (__file__ ).parent .resolve ()
8
+ IMAGE_SPECIFIC_TESTS_DIR = THIS_DIR .parent / "image_specific_tests"
9
+
10
+ assert IMAGE_SPECIFIC_TESTS_DIR .exists (), f"{ IMAGE_SPECIFIC_TESTS_DIR } does not exist."
11
+
12
+
13
+ def get_test_dirs (image : str | None ) -> list [Path ]:
14
+ if image is None :
15
+ return []
16
+
17
+ test_dirs = get_test_dirs (IMAGE_PARENT [image ])
18
+ current_test_dir = IMAGE_SPECIFIC_TESTS_DIR / image
19
+ assert current_test_dir .exists (), f"{ current_test_dir } does not exist."
20
+ test_dirs .append (current_test_dir )
21
+ return test_dirs
Original file line number Diff line number Diff line change 1
1
# Copyright (c) Jupyter Development Team.
2
2
# Distributed under the terms of the Modified BSD License.
3
- from pathlib import Path
4
-
5
- THIS_DIR = Path (__file__ ).parent .resolve ()
6
- IMAGE_SPECIFIC_TESTS_DIR = THIS_DIR .parent / "image_specific_tests"
7
-
8
- assert IMAGE_SPECIFIC_TESTS_DIR .exists (), f"{ IMAGE_SPECIFIC_TESTS_DIR } does not exist."
9
3
10
4
# Please, take a look at the hierarchy of the images here:
11
5
# https://jupyter-docker-stacks.readthedocs.io/en/latest/using/selecting.html#image-relationships
12
- _IMAGE_PARENT = {
6
+ IMAGE_PARENT = {
13
7
"docker-stacks-foundation" : None ,
14
8
"base-notebook" : "docker-stacks-foundation" ,
15
9
"minimal-notebook" : "base-notebook" ,
22
16
"pyspark-notebook" : "scipy-notebook" ,
23
17
"all-spark-notebook" : "pyspark-notebook" ,
24
18
}
25
-
26
-
27
- def get_test_dirs (image : str | None ) -> list [Path ]:
28
- if image is None :
29
- return []
30
-
31
- test_dirs = get_test_dirs (_IMAGE_PARENT [image ])
32
- current_test_dir = IMAGE_SPECIFIC_TESTS_DIR / image
33
- assert current_test_dir .exists (), f"{ current_test_dir } does not exist."
34
- test_dirs .append (current_test_dir )
35
- return test_dirs
Original file line number Diff line number Diff line change 2
2
# Distributed under the terms of the Modified BSD License.
3
3
import logging
4
4
5
- from tests .hierarchy .images_hierarchy import get_test_dirs
5
+ from tests .hierarchy .get_test_dirs import get_test_dirs
6
6
from tests .utils .tracked_container import TrackedContainer
7
7
8
8
LOGGER = logging .getLogger (__name__ )
Original file line number Diff line number Diff line change 6
6
7
7
import plumbum
8
8
9
- from tests .hierarchy .images_hierarchy import get_test_dirs
9
+ from tests .hierarchy .get_test_dirs import get_test_dirs
10
10
11
11
python3 = plumbum .local ["python3" ]
12
12
You can’t perform that action at this time.
0 commit comments