@@ -38,7 +38,7 @@ def test_00_tesseract_init(tesseract_dir: Path) -> None:
38
38
assert run_res .stdout
39
39
40
40
41
- def test_01a_tesseract_schema (tesseract_dir : Path ) -> None :
41
+ def test_01a_tesseract_schema (tesseract_dir : Path , docker_cleanup ) -> None :
42
42
"""Test for step 1 of the bootcamp tutorial.
43
43
44
44
Validate the input and output schema of the Tesseract.
@@ -55,6 +55,7 @@ def test_01a_tesseract_schema(tesseract_dir: Path) -> None:
55
55
)
56
56
assert run_res .exit_code == 0 , run_res .stderr
57
57
assert run_res .stdout
58
+ docker_cleanup ["images" ].append (BOOTCAMP_IMAGE_NAME )
58
59
59
60
test_commands = ("input-schema" , "output-schema" )
60
61
for command in test_commands :
@@ -76,7 +77,7 @@ def test_01a_tesseract_schema(tesseract_dir: Path) -> None:
76
77
assert '"type":"string"' in run_res .stdout
77
78
78
79
79
- def test_01b_tesseract_apply (tesseract_dir : Path ) -> None :
80
+ def test_01b_tesseract_apply (tesseract_dir : Path , docker_cleanup ) -> None :
80
81
"""Test for step 2 of the bootcamp tutorial.
81
82
82
83
Validate that the apply function is correctly implemented.
@@ -91,6 +92,7 @@ def test_01b_tesseract_apply(tesseract_dir: Path) -> None:
91
92
)
92
93
assert run_res .exit_code == 0 , run_res .stderr
93
94
assert run_res .stdout
95
+ docker_cleanup ["images" ].append (BOOTCAMP_IMAGE_NAME )
94
96
95
97
# Check that the apply function is implemented
96
98
# Convert numbers to words
@@ -106,12 +108,24 @@ def test_01b_tesseract_apply(tesseract_dir: Path) -> None:
106
108
assert "hello tesseract" in run_res .stdout
107
109
108
110
109
- def test_02_tesseract_packagedata () -> None :
111
+ def test_02_tesseract_packagedata (tesseract_dir : Path , docker_cleanup ) -> None :
110
112
"""Test for step 3 of the bootcamp tutorial.
111
113
112
114
Call the apply function on secret_message.json and check that
113
115
the output is correct.
114
116
"""
117
+ run_res = cli_runner .invoke (
118
+ app ,
119
+ [
120
+ "build" ,
121
+ tesseract_dir ,
122
+ ],
123
+ catch_exceptions = False ,
124
+ )
125
+ assert run_res .exit_code == 0 , run_res .stderr
126
+ assert run_res .stdout
127
+ docker_cleanup ["images" ].append (BOOTCAMP_IMAGE_NAME )
128
+
115
129
data_dir = Path (__file__ ).parent / "example_data"
116
130
run_res = cli_runner .invoke (
117
131
app ,
0 commit comments