On Sun, 2010-07-11 at 09:13 -0700, Jason R. Coombs wrote: > I see that setuptools has an interface for launching the tests via 'setup.py > test': http://peak.telecommunity.com/DevCenter/setuptools#test-loader > > I see that the tests work with nose and unittest. Does py.test provide the > necessary interfaces to launch py.test via setuptools? > > I've confirmed my tests are running naturally; I run 'py.test' and the tests > run and pass. I tried passing test_suite='py.test' to the setup command, and > this does indeed launch py.test from 'setup.py test', but no tests are run. I > tried specifying the collector class 'py.test.collect.Collector' and cmdline > 'py.test.cmdline.main', but neither of these options worked (as they don't > supply the expected interfaces). > > Any suggestions for using py.test from setuptools? >
It wont work that way, py.test is not based on the unittest interfaces, thats the only thing setuptools supports. The execnet package has code that shows how this could work, by supplying a new test command class instead. Take a look if http://bitbucket.org/hpk42/execnet/src/tip/setup.py#cl-67 might fiy your needs. Maybe this should be extended and included in py.test or tox. -- Ronny _______________________________________________ py-dev mailing list py-dev@codespeak.net http://codespeak.net/mailman/listinfo/py-dev