Commit dbb91073 authored by Tiago de Freitas Pereira's avatar Tiago de Freitas Pereira
Browse files

[nose] Improved test case

[nose] Improved test case
parent 9a3d419a
Pipeline #45919 passed with stage
in 8 minutes and 50 seconds
......@@ -13,6 +13,7 @@ from sklearn.utils.validation import check_array
from sklearn.utils.validation import check_is_fitted
from bob.pipelines.utils import hash_string
import bob.pipelines as mario
import tempfile
def _offset_add_func(X, offset=1):
......@@ -176,14 +177,19 @@ def test_checkpoint_function_sample_transfomer():
_assert_all_close_numpy_array(oracle, [ for s in features])
# test when both model_path and features_dir is None
with tempfile.TemporaryDirectory() as dir_name:
transformer = mario.wrap(
[FunctionTransformer, "sample", "checkpoint"],
features = transformer.transform(samples)
# Checking if we have 8 chars in the second level
assert len(features[0].load.args[0].split("/")[-2]) == 8
_assert_all_close_numpy_array(oracle, [ for s in features])
Markdown is supported
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