#! /usr/bin/python -O # -*- coding: iso-8859-15 -*- # # A simple Awalé game. # Copyright (C) 2007 MiKael NAVARRO # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # """A simple Awalé game. Copyright (C) 2007 MiKael NAVARRO The count-and-capture official board game of Africa. Test Awale module and docstrings. """ # Specific variables for pydoc __author__ = "MiKael Navarro " # Include directives import sys import os #import glob import doctest import unittest if __debug__: from pprint import pprint as pp # # Main test function. # def test(): suite = unittest.TestSuite() # First, verify doc tests #doc_text_suite = doctest.DocTestSuite("awale") #suite.addTest(doc_text_suite) lib_path = os.path.join(os.path.dirname(os.path.abspath(__file__)), "../src/") sys.path.append(lib_path) for doc_file in ["../doc/pyawale.rest", "../doc/awale_module.rest", "../doc/awale_algos.rest"]: doc_file_suite = doctest.DocFileSuite(doc_file, module_relative=True, ) suite.addTest(doc_file_suite) # Then, launch test suite campagne = unittest.TextTestRunner(verbosity=2) campagne.run(suite) # # External entry point. # if __name__ == "__main__": test()