Commit beafa1b1 authored by Remi Cresson's avatar Remi Cresson
Browse files

TEST: add testing for extra outputs

1 merge request!96Draft: Model output autonaming
Pipeline #49354 passed with stages
in 19 minutes and 37 seconds
Showing with 14 additions and 4 deletions
+14 -4
...@@ -89,14 +89,24 @@ class APITest(unittest.TestCase): ...@@ -89,14 +89,24 @@ class APITest(unittest.TestCase):
) )
def _test_compare(command): def _test_compare(command):
self.assertTrue( self.assertTrue(
run_command_and_compare( run_command_and_compare(
command=command, command=command,
to_compare_dict={ to_compare_dict={
"$DATADIR/classif_model4_softmax.tif": "$DATADIR/classif_model4_softmax.tif":
"$TMPDIR/classif_model4_softmax.tif" "$TMPDIR/classif_model4_softmax.tif"
}, },
tol=INFERENCE_MAE_TOL)) tol=INFERENCE_MAE_TOL
)
)
def _test_exist(command):
self.assertTrue(
run_command_and_test_exist(
command=command,
file_list=["$TMPDIR/classif_model4_softmax.tif"]
)
)
# softmax (from layer name) # softmax (from layer name)
_test_compare(command_crop16_softmax) _test_compare(command_crop16_softmax)
...@@ -107,8 +117,8 @@ class APITest(unittest.TestCase): ...@@ -107,8 +117,8 @@ class APITest(unittest.TestCase):
_test_compare(command_crop32_softmax2) _test_compare(command_crop32_softmax2)
# argmax # argmax
self.assertTrue(run_command_and_test_exist(command_crop16_argmax)) _test_exist(command_crop16_argmax)
self.assertTrue(run_command_and_test_exist(command_crop32_argmax)) _test_exist(command_crop32_argmax)
@pytest.mark.order(3) @pytest.mark.order(3)
def test_create_tfrecords(self): def test_create_tfrecords(self):
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment