Commits

Anonymous committed 20bca08

ignore .orig files from hg revert

added a test module with doctests in it

  • Participants
  • Parent commits b761c26

Comments (0)

Files changed (3)

 syntax: glob
 
+*.orig
 *.pyc
 *.egg-info
 build
 dist
+

File examples/README.TXT

 If you change directory into the 'project' directory, you should be able  to
 run the nose test runner and get reasonable results.
 
+Note that you *won't* be running your doctests unless you tell nose to do so.
 
-Something like this:
+As usual, you need to tell nose to run doctest test strings in modules that
+contain standard test classes.
 
-    C:\dev\nosedjango\examples\project>nosetests -v --with-django
+A successful run should hit *7* test cases.
+
+    C:\dev\nosedjango\examples\project>nosetests -v --with-django --with-doctest --d
+    octest-tests --doctest-tests
+    Doctest: project.zoo.models ... ok
+    Doctest: project.zoo.models.Zoo ... ok
+    Doctest: project.zoo.models.Zoo.__str__ ... ok
+    Doctest: project.zoo.models.func ... ok
+    This is just a stub for a regular test method ... ok
+    Doctest: project.zoo.test_foo.blah ... ok
     project.tests.test_views.test_view_index ... ok
 
     ----------------------------------------------------------------------
-    Ran 1 test in 0.047s
+    Ran 7 tests in 0.562s
 
     OK
     Destroying test database...
-
-    C:\dev\nosedjango\examples\project>
-
-

File examples/project/zoo/test_foo.py

+
+def test_regular_test_method():
+    ''' This is just a stub for a regular test method'''
+    pass
+
+def blah():
+    '''
+    This is a doctest that might get skipped
+
+    >>> 5 + 5 
+    10
+    '''