Hello pytesters, I am trying to get guessit <https://github.com/bsravanin/guessit> to adopt pytest this month. It uses tox. When I try to run the tests with the "--doctest-modules" option, the tests are being discovered as expected, but the run fails with the following error:
========================================================================== > ERRORS > ========================================================================== > ________________________________________________________________ ERROR > collecting setup.py > _________________________________________________________________ > setup.py:109: in <module> > setup(**args) > /usr/local/Cellar/python/2.7.9/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/core.py:139: > in setup > raise SystemExit, gen_usage(dist.script_name) + "\nerror: %s" % msg > E SystemExit: usage: py.test [global_opts] cmd1 [cmd1_opts] [cmd2 > [cmd2_opts] ...] > E or: py.test --help [cmd1 cmd2 ...] > E or: py.test --help-commands > E or: py.test cmd --help > E > E error: option --doctest-modules not recognized > =========================================================== 46 passed, 1 > error in 15.08 seconds > ============================================================ You can checkout this commit <https://github.com/bsravanin/guessit/commit/01b0de3bb52a4c8fced49f5feb0c67a906a5aca4> to see what's going on. If you need any more information, please let me know. There is a second problem. When I try to run "py.test --doctest-modules" after activating the virtualenv (source .tox/py27/bin/activate, e.g.), the doctests are being discovered immediately. But when I try to run them as part of the tox command (which runs "python setup.py test" which in turn uses a TestCommand to run pytests), the discover of doctests is taking about 15s. It would be nice to be able to also fix that. I searched StackOverflow, but there're quite a few pytest-doctest questions there that have been unanswered, so I'm emailing this list directly. Regards, Sravan
_______________________________________________ pytest-dev mailing list [email protected] https://mail.python.org/mailman/listinfo/pytest-dev
