Skip to content
Advertisement

Tag: doctest

doctest doesn’t test classes methods in a module

I can’t manage to have doctest test my modules classes methods. My module looks like that: A.py contains: (so the tests should fail) __init__.py contains And then I run Why doesn’t doctest test A.method ? Answer I found out why. Why it doesn’t work doctest tries to detect which tests don’t belong to the tested module, and doesn’t run them.

Advertisement