diff --git a/include/mapnik/value.hpp b/include/mapnik/value.hpp index e04ea1d10..41ec287c9 100644 --- a/include/mapnik/value.hpp +++ b/include/mapnik/value.hpp @@ -985,13 +985,6 @@ struct is_null : public boost::static_visitor boost::ignore_unused_variable_warning(val); return false; } - - template - bool operator() (boost::variant const& val) - const - { - return boost::apply_visitor(*this, val); - } }; } // namespace impl diff --git a/tests/run_tests.py b/tests/run_tests.py index 5d89dd9f3..45326b0ef 100755 --- a/tests/run_tests.py +++ b/tests/run_tests.py @@ -1,4 +1,5 @@ #!/usr/bin/env python +# -*- coding: utf-8 -*- import sys @@ -7,6 +8,12 @@ try: except ImportError, e: sys.stderr.write("Unable to run python tests: the third party 'nose' module is required\nTo install 'nose' do:\n\tsudo pip install nose (or on debian systems: apt-get install python-nose): %s\n" % e) sys.exit(1) + +try: + import mapnik +except ImportError: + print '\x1b[31m✘\x1b[0m (\x1b[34m%s\x1b[0m)' % 'import mapnik failed - tests require python bindings' + sys.exit(0) from python_tests.utilities import TodoPlugin from nose.plugins.doctests import Doctest diff --git a/tests/visual_tests/test.py b/tests/visual_tests/test.py index 4c3ddee8a..5e0bc5306 100755 --- a/tests/visual_tests/test.py +++ b/tests/visual_tests/test.py @@ -1,11 +1,17 @@ #!/usr/bin/env python # -*- coding: utf-8 -*- -import mapnik -mapnik.logger.set_severity(mapnik.severity_type.None) +import sys + +try: + import mapnik + mapnik.logger.set_severity(mapnik.severity_type.None) + #mapnik.logger.set_severity(mapnik.severity_type.Debug) +except ImportError: + print '\x1b[31m✘\x1b[0m (\x1b[34m%s\x1b[0m)' % 'import mapnik failed - tests require python bindings' + sys.exit(0) import shutil -import sys import os.path from compare import compare, compare_grids