@@ -17,43 +17,43 @@ def analysis_json_fixture():
17
17
return config ["tool" ]["cldk" ]["testing" ]["sample-application-analysis-json" ]
18
18
19
19
20
- @pytest .fixture (scope = "session" , autouse = True )
21
- def test_fixture ():
22
- """
23
- Returns the path to the test data directory.
24
-
25
- Yields:
26
- Path : The path to the test data directory.
27
- """
28
- # ----------------------------------[ SETUP ]----------------------------------
29
- # Path to your pyproject.toml
30
- pyproject_path = Path (__file__ ).parent .parent / "pyproject.toml"
31
-
32
- # Load the configuration
33
- config = toml .load (pyproject_path )
34
-
35
- # Access the test data path
36
- test_data_path = config ["tool" ]["cldk" ]["testing" ]["sample-application" ]
37
-
38
- if not Path (test_data_path ).exists ():
39
- Path (test_data_path ).mkdir (parents = True )
40
- url = "https://github.com/OpenLiberty/sample.daytrader8/archive/refs/tags/v1.2.zip"
41
- filename = Path (test_data_path ).absolute () / "v1.2.zip"
42
- urlretrieve (url , filename )
43
-
44
- # Extract the zip file to the test data path
45
- with zipfile .ZipFile (filename , "r" ) as zip_ref :
46
- zip_ref .extractall (test_data_path )
47
-
48
- # Remove the zip file
49
- filename .unlink ()
50
- # --------------------------------------------------------------------------------
51
- # Daytrader8 sample application path
52
- yield Path (test_data_path ) / "sample.daytrader8-1.2"
53
-
54
- # -----------------------------------[ TEARDOWN ]----------------------------------
55
- # Remove the daytrader8 sample application that was downloaded for testing
56
- for directory in Path (test_data_path ).iterdir ():
57
- if directory .exists () and directory .is_dir ():
58
- shutil .rmtree (directory )
59
- # ---------------------------------------------------------------------------------
20
+ # @pytest.fixture(scope="session", autouse=True)
21
+ # def test_fixture():
22
+ # """
23
+ # Returns the path to the test data directory.
24
+
25
+ # Yields:
26
+ # Path : The path to the test data directory.
27
+ # """
28
+ # # ----------------------------------[ SETUP ]----------------------------------
29
+ # # Path to your pyproject.toml
30
+ # pyproject_path = Path(__file__).parent.parent / "pyproject.toml"
31
+
32
+ # # Load the configuration
33
+ # config = toml.load(pyproject_path)
34
+
35
+ # # Access the test data path
36
+ # test_data_path = config["tool"]["cldk"]["testing"]["sample-application"]
37
+
38
+ # if not Path(test_data_path).exists():
39
+ # Path(test_data_path).mkdir(parents=True)
40
+ # url = "https://github.com/OpenLiberty/sample.daytrader8/archive/refs/tags/v1.2.zip"
41
+ # filename = Path(test_data_path).absolute() / "v1.2.zip"
42
+ # urlretrieve(url, filename)
43
+
44
+ # # Extract the zip file to the test data path
45
+ # with zipfile.ZipFile(filename, "r") as zip_ref:
46
+ # zip_ref.extractall(test_data_path)
47
+
48
+ # # Remove the zip file
49
+ # filename.unlink()
50
+ # # --------------------------------------------------------------------------------
51
+ # # Daytrader8 sample application path
52
+ # yield Path(test_data_path) / "sample.daytrader8-1.2"
53
+
54
+ # # -----------------------------------[ TEARDOWN ]----------------------------------
55
+ # # Remove the daytrader8 sample application that was downloaded for testing
56
+ # for directory in Path(test_data_path).iterdir():
57
+ # if directory.exists() and directory.is_dir():
58
+ # shutil.rmtree(directory)
59
+ # # ---------------------------------------------------------------------------------
0 commit comments