How to run doctest in a file?

Issue #73 invalid
Former user created an issue

Hi, I'm not sure that it's right place to ask here, but don't find any other.

I install py using pip, and just want simple run the doctest in a file, but there seems no responses about pass or fail even if I deliberately changed the docstring to make it fail.

greg@house:~/source/testtracker/tests$ py.test -p doctest test_known_issues_checker.py ===================================================== test session starts ====================================================== python: platform linux2 -- Python 2.6.4 -- pytest-1.1.1 test object 1: /home/greg/source/testtracker/tests/test_known_issues_checker.py

======================================================= in 0.00 seconds ======================================================= greg@house:~/source/testtracker/tests$

Am I wrong about something? Appreciate your help, thanks

Regards, Chenz

Comments (1)

  1. Holger Krekel repo owner

    Hi, i think you just need to pass "--doctest-modules", see "--help-config" for which conftest.py or ENV-var you need to set to get this as a default behaviour. cheers, holger

  2. Log in to comment