From c4190a56ab62b1a63c1c55bcef3860701a322bed Mon Sep 17 00:00:00 2001 From: Luke Yeager Date: Wed, 18 Nov 2015 10:38:32 -0800 Subject: [PATCH] Skip python layer tests if WITH_PYTHON_LAYER unset --- python/caffe/test/test_python_layer.py | 2 ++ python/caffe/test/test_python_layer_with_param_str.py | 2 ++ 2 files changed, 4 insertions(+) diff --git a/python/caffe/test/test_python_layer.py b/python/caffe/test/test_python_layer.py index 8ed86655..e46b7118 100644 --- a/python/caffe/test/test_python_layer.py +++ b/python/caffe/test/test_python_layer.py @@ -77,6 +77,8 @@ def parameter_net_file(): return f.name +@unittest.skipIf('Python' not in caffe.layer_type_list(), + 'Caffe built without Python layer support') class TestPythonLayer(unittest.TestCase): def setUp(self): net_file = python_net_file() diff --git a/python/caffe/test/test_python_layer_with_param_str.py b/python/caffe/test/test_python_layer_with_param_str.py index 3d0f107b..c36048ae 100644 --- a/python/caffe/test/test_python_layer_with_param_str.py +++ b/python/caffe/test/test_python_layer_with_param_str.py @@ -38,6 +38,8 @@ def python_param_net_file(): return f.name +@unittest.skipIf('Python' not in caffe.layer_type_list(), + 'Caffe built without Python layer support') class TestLayerWithParam(unittest.TestCase): def setUp(self): net_file = python_param_net_file()