ztfy/utils/tests/test_utilsdocs.py
changeset 48 d9a45c366c6c
parent 0 712d20d2751e
child 70 82d8de021806
equal deleted inserted replaced
47:ad9c8c79b9d0 48:d9a45c366c6c
     1 # -*- coding: utf-8 -*-
     1 ### -*- coding: utf-8 -*- ####################################################
     2 # Copyright (c) 2008 Thierry Florac
     2 ##############################################################################
       
     3 #
       
     4 # Copyright (c) 2008-2010 Thierry Florac <tflorac AT ulthar.net>
       
     5 # All Rights Reserved.
       
     6 #
       
     7 # This software is subject to the provisions of the Zope Public License,
       
     8 # Version 2.1 (ZPL).  A copy of the ZPL should accompany this distribution.
       
     9 # THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
       
    10 # WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
       
    11 # WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
       
    12 # FOR A PARTICULAR PURPOSE.
       
    13 #
       
    14 ##############################################################################
     3 
    15 
     4 # This program is free software; you can redistribute it and/or modify
       
     5 # it under the terms of the GNU General Public License as published by
       
     6 # the Free Software Foundation; either version 2 of the License, or
       
     7 # (at your option) any later version.
       
     8 
       
     9 # This program is distributed in the hope that it will be useful,
       
    10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
       
    11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
       
    12 # GNU General Public License for more details.
       
    13 
       
    14 # You should have received a copy of the GNU General Public License
       
    15 # along with this program; see the file COPYING. If not, write to the
       
    16 # Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
       
    17 """
    16 """
    18 Generic Test case for ztfy.utils doctest
    17 Generic Test case for ztfy.utils doctest
    19 """
    18 """
    20 __docformat__ = 'restructuredtext'
    19 __docformat__ = 'restructuredtext'
    21 
    20 
    46     # filtering files on extension
    45     # filtering files on extension
    47     docs = [os.path.join(doctest_dir, doc) for doc in
    46     docs = [os.path.join(doctest_dir, doc) for doc in
    48             os.listdir(doctest_dir) if doc.endswith('.txt')]
    47             os.listdir(doctest_dir) if doc.endswith('.txt')]
    49 
    48 
    50     for test in docs:
    49     for test in docs:
    51         suite.append(doctest.DocFileSuite(test, optionflags=flags, 
    50         suite.append(doctest.DocFileSuite(test, optionflags=flags,
    52                                           globs=globs, setUp=setUp, 
    51                                           globs=globs, setUp=setUp,
    53                                           tearDown=tearDown,
    52                                           tearDown=tearDown,
    54                                           module_relative=False))
    53                                           module_relative=False))
    55 
    54 
    56     return unittest.TestSuite(suite)
    55     return unittest.TestSuite(suite)
    57 
    56