diff --git a/include/mapnik/value.hpp b/include/mapnik/value.hpp index 68726958b..dba068f6a 100644 --- a/include/mapnik/value.hpp +++ b/include/mapnik/value.hpp @@ -1010,6 +1010,13 @@ 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 45326b0ef..4538571b1 100755 --- a/tests/run_tests.py +++ b/tests/run_tests.py @@ -1,5 +1,4 @@ #!/usr/bin/env python -# -*- coding: utf-8 -*- import sys @@ -9,12 +8,7 @@ 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) - +import mapnik 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 379c2971e..1a34b3c44 100755 --- a/tests/visual_tests/test.py +++ b/tests/visual_tests/test.py @@ -2,16 +2,11 @@ # -*- coding: utf-8 -*- 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 mapnik +mapnik.logger.set_severity(mapnik.severity_type.None) +#mapnik.logger.set_severity(mapnik.severity_type.Debug) import shutil +import sys import os.path from compare import compare, compare_grids