문제

I'm trying to work with one of the eggs in Plone (collective.z3cform.wizard). I'm following doctests while reading documentation and at this point would like to write tests for my own code.

The problem is that while I'm following test examples they differ from what I'm getting by running my tests. I would like to run tests on that third-party egg before looking for other solutions, the thing is -- I don't know how.

In Plone 3 it was possible to specify third-party tests through ./bin/instance test, when I'm trying to just run ./bin/test in Plone 4, I end up running only my development tests. So far I've tried using --module and --package options but all I seem to get is ImportErrors.

UPDATE: I'm justing buildout and here's a relevant part of it

[test]
recipe = zc.recipe.testrunner
defaults = ['--auto-color', '--auto-progress']
eggs =
      ... my development eggs...
도움이 되었습니까?

해결책

The bin/test command is created by a buildout part, usually using the zc.recipe.testrunner or collective.xmltestreport recipes. Those recipes support an eggs entry to configure what eggs are available to it.

If you installed Plone with the unified installer, then the [test] part is set up to include the test-packages entry from the [buildout] section, so in your development.cfg you can add eggs to that entry as well to ensure the eggs you want to test are included.

To run all the tests for one package, use the -s option to bin/test:

bin/test -s collective.z3cform.wizard
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top