Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

conflicts with django-coverage #4

Open
AdrienLemaire opened this issue Oct 5, 2011 · 2 comments
Open

conflicts with django-coverage #4

AdrienLemaire opened this issue Oct 5, 2011 · 2 comments

Comments

@AdrienLemaire
Copy link
Contributor

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.

@dragoon
Copy link
Owner

dragoon commented Oct 5, 2011

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?

@AdrienLemaire
Copy link
Contributor Author

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 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?

Reply to this email directly or view it on GitHub:
#4 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants