@@ -0,0 +1,1739 @@
+# Copyright 2014-2016 The ODL development group%0A#%0A# This file is part of ODL.%0A#%0A# ODL is free software: you can redistribute it and/or modify%0A# it under the terms of the GNU General Public License as published by%0A# the Free Software Foundation, either version 3 of the License, or%0A# (at your option) any later version.%0A#%0A# ODL is distributed in the hope that it will be useful,%0A# but WITHOUT ANY WARRANTY; without even the implied warranty of%0A# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the%0A# GNU General Public License for more details.%0A#%0A# You should have received a copy of the GNU General Public License%0A# along with ODL.  If not, see %3Chttp://www.gnu.org/licenses/%3E.%0A%0A# Imports for common Python 2/3 codebase%0Afrom __future__ import print_function, division, absolute_import%0Afrom future import standard_library%0Astandard_library.install_aliases()%0A%0Aimport doctest%0Afrom doctest import IGNORE_EXCEPTION_DETAIL, ELLIPSIS, NORMALIZE_WHITESPACE%0Aimport os%0A%0Aimport odl%0A%0Aroot_dir = os.path.join(os.path.abspath(os.path.dirname(__file__)), 'source')%0Atest_dirs = %5B'guide'%5D%0Aexclude_files = %5B'faq.rst'%5D%0A%0Adoc_src_files = %5B%5D%0Adoctest_optionflags = NORMALIZE_WHITESPACE %7C ELLIPSIS %7C IGNORE_EXCEPTION_DETAIL%0A%0Afor test_dir in test_dirs:%0A    for path, _, filenames in os.walk(os.path.join(root_dir, test_dir)):%0A        for filename in filenames:%0A            if ((filename.endswith('.rst') or filename.endswith('.py')) and%0A                    filename not in exclude_files):%0A                doc_src_files.append(path + '/' + filename)%0A%0Afor doc_src_file in doc_src_files:%0A    doctest.testfile(doc_src_file, module_relative=False, report=True,%0A                     extraglobs=%7B'odl': odl%7D,%0A                     optionflags=doctest_optionflags)%0A

add helper to doctest the online doc examples