Changeset 30

Show
Ignore:
Timestamp:
05/30/06 15:36:33 (6 years ago)
Author:
mk
Message:

Instruct nose to use doctests.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/mk/cheesecake/cheesecake_index.py

    r28 r30  
    3636 
    3737def has_extension(filename, ext): 
     38    """Check if filename has given extension. 
     39 
     40    >>> has_extension("foobar.py", ".py") 
     41    True 
     42    >>> has_extension("foo.bar.py", ".py") 
     43    True 
     44    >>> has_extension("foobar.pyc", ".py") 
     45    False 
     46    """ 
    3847    return os.path.splitext(filename)[1] == ext 
    3948 
     
    683692 
    684693    def which_cheese_file(self, filename): 
     694        """Find out which Cheese file coresponds to given filename (if any). 
     695 
     696        Return False if filename is not a Cheese file. 
     697        """ 
    685698        text_cheese_files = filter(lambda x: not has_extension(x, ".py"), 
    686699                                   self.cheese_files) 
  • branches/mk/setup.py

    r19 r30  
    11#! /usr/bin/env python 
    22import sys 
    3 import os.path 
     3import os 
    44 
    55from setuptools import setup 
    66from pkg_resources import require 
     7 
     8# Instruct nose to use doctests. 
     9os.environ['NOSE_WITH_DOCTEST'] = 'True' 
     10os.environ['NOSE_DOCTEST_TESTS'] = 'True' 
    711 
    812setup(