Erotemic / xdoctest

A rewrite of Python's builtin doctest module (with pytest plugin integration) with AST instead of REGEX.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Failed tests sometimes incorrectly reports modnames instead of modpaths

Erotemic opened this issue · comments

I'm running doctests in a file with a xdoctest main block (i.e. xdoctest.doctest_module(__file__)) using the command

python ~/code/netharn/netharn/examples/yolo_voc.py all

When failures are reported they are printed as

python -m xdoctest yolo_voc YoloVOCDataset:1
python -m xdoctest yolo_voc YoloVOCDataset.__getitem__:0
python -m xdoctest yolo_voc YoloVOCDataset.__getitem__:1

This is incorrect because yolo_voc is not a module in my PYTHONPATH.

It would be good to:

  • Add tests that reproduce this error
  • Write the appropriate fixes.