django-selenium
django-selenium copied to clipboard
conflicts with django-coverage
I'm using both south, django-coverage and django-selenium in my project. Funny thing is, they both override the django test command, and in 3 different ways. Things are, only south do it properly with a super(Command).
django-coverage do a call_command("test") at the end of the handle(), therefore calling django-selenium and ending broken.
The solution I found to get everything working is to rename my app/management/commands/test.py into test_selenium.py, then call test_selenium from my fab test script, and test_coverage for the coverage.
Might be worth to let a word about it in the README, and to find a better way to override test in django-selenium to finish by a super.
Actually, I've used django-coverage source as a basis for test command in django-selenium, but I can't just call test command since I need to supply extra arguments related to selenium.
I'm now looking at the django-coverage source here:
https://bitbucket.org/dragoon/django-coverage/src/d939608596d1/django_coverage/coverage_runner.py
See the __new__
function of the CoverageRunner
. If the base class is not DjangoTestSuiteRunner
(SeleniumTestRunner
in our case), it should inherit from it and run customized run_tests()
function.
Have you tried this trick?
Having a call_command a-la django_coverage is ok, but you still need to call the command test_selenium to not override the django test. The south way of doing by calling the parent handle with super is much better. But maybe it's simpler to wait for django 1.4, I dunno On Oct 5, 2011 10:28 PM, "Roman Prokofyev" < [email protected]> wrote:
Actually, I've used django-coverage source as a basis for test command in django-selenium, but I can't just call test command since I need to supply extra arguments related to selenium.
I'm now looking at the django-coverage source here:
https://bitbucket.org/dragoon/django-coverage/src/d939608596d1/django_coverage/coverage_runner.py See the
__new__
function of theCoverageRunner
. If the base class is notDjangoTestSuiteRunner
(SeleniumTestRunner
in our case), it should inherit from it and run customizedrun_tests()
function. Have you tried this trick?Reply to this email directly or view it on GitHub: https://github.com/dragoon/django-selenium/issues/4#issuecomment-2297854