First time here? Check out the FAQ!

Revision history  [back]

Fails 2 tests right after installation

Failures are the following:

====================================================================== FAIL: test_anonymous_question_cache (askbot.tests.cache_tests.CacheTests) ---------------------------------------------------------------------- Traceback (most recent call last):
File "/media/sf_Ubuntu/4hou4ken/askbot/askbot/tests/cache_tests.py", line 29, in test_anonymous_question_cache 'Before visit: %d. After visit: %d.') % (before_count, after_count)) AssertionError: Expected fewer queries after calling visit_question. Before visit: 38. After visit: 330.

====================================================================== FAIL: test_clean (askbot.tests.form_tests.UserNameFieldTest) ---------------------------------------------------------------------- Traceback (most recent call last):
File "/media/sf_Ubuntu/4hou4ken/askbot/askbot/tests/form_tests.py", line 314, in test_clean self.assertRaises(django_forms.ValidationError, self.username_field.clean, '......') AssertionError: ValidationError not raised

---------------------------------------------------------------------- Ran 645 tests in 372.598s

Right after installing with

python setup.py develop

and creating a project with

askbot-setup

I ran tests with

python manage.py test askbot

which returned the 2 failures above.

I tried this with both 0.7.48 and the latest version that I cloned from the github repo, ending up with the same failures above.

Are they not such harmful failures? How can I fix them if it is critical to fix them?

Any thoughts would be appreciated. Thank you.

Update: Running the failed test separately with the following command does not give a failure.

python manage.py test askbot.CacheTests.test_anonymous_question_cache

This fact confuses me because someone taught me that each unittest should be independent of one another. However, the above results suggest that askbot tests are not independent of one another. Again, any thoughts will be appreciated.

Update2:

I would like to also point out that test_clean test still gives a failure even when run separately.

Fails 2 tests right after installation

Failures are the following:

====================================================================== FAIL: test_anonymous_question_cache (askbot.tests.cache_tests.CacheTests) ---------------------------------------------------------------------- Traceback (most recent call last):
File "/media/sf_Ubuntu/4hou4ken/askbot/askbot/tests/cache_tests.py", line 29, in test_anonymous_question_cache 'Before visit: %d. After visit: %d.') % (before_count, after_count)) AssertionError: Expected fewer queries after calling visit_question. Before visit: 38. After visit: 330.

====================================================================== FAIL: test_clean (askbot.tests.form_tests.UserNameFieldTest) ---------------------------------------------------------------------- Traceback (most recent call last):
File "/media/sf_Ubuntu/4hou4ken/askbot/askbot/tests/form_tests.py", line 314, in test_clean self.assertRaises(django_forms.ValidationError, self.username_field.clean, '......') AssertionError: ValidationError not raised

---------------------------------------------------------------------- Ran 645 tests in 372.598s

Right after installing with

python setup.py develop

and creating a project with

askbot-setup

I ran tests with

python manage.py test askbot

which returned the 2 failures above.

I tried this with both 0.7.48 and the latest version that I cloned from the github repo, ending up with the same failures above.

Are they not such harmful failures? How can I fix them if it is critical to fix them?

Any thoughts would be appreciated. Thank you.

Update: Running the failed test separately with the following command does not give a failure.

python manage.py test askbot.CacheTests.test_anonymous_question_cache

This fact confuses me because someone taught me that each unittest should be independent of one another. However, the above results suggest that askbot tests are not independent of one another. Again, any thoughts will be appreciated.

Update2:

I would like to also point out that test_clean test still gives a failure even when run separately.

Fails 2 tests right after installation

Failures are the following:

====================================================================== FAIL: test_anonymous_question_cache (askbot.tests.cache_tests.CacheTests) ---------------------------------------------------------------------- Traceback (most recent call last):
File "/media/sf_Ubuntu/4hou4ken/askbot/askbot/tests/cache_tests.py", line 29, in test_anonymous_question_cache 'Before visit: %d. After visit: %d.') % (before_count, after_count)) AssertionError: Expected fewer queries after calling visit_question. Before visit: 38. After visit: 330.

====================================================================== FAIL: test_clean (askbot.tests.form_tests.UserNameFieldTest) ---------------------------------------------------------------------- Traceback (most recent call last):
File "/media/sf_Ubuntu/4hou4ken/askbot/askbot/tests/form_tests.py", line 314, in test_clean self.assertRaises(django_forms.ValidationError, self.username_field.clean, '......') AssertionError: ValidationError not raised

---------------------------------------------------------------------- Ran 645 tests in 372.598s

Right after installing with

python setup.py develop

and creating a project with

askbot-setup

I ran tests with

python manage.py test askbot

which returned the 2 failures above.

I tried this with both 0.7.48 and the latest version that I cloned from the github repo, ending up with the same failures above.

Are they not such harmful failures? How can I fix them if it is critical to fix them?

Any thoughts would be appreciated. Thank you.

Update: Running the failed test separately with the following command does not give a failure.

python manage.py test askbot.CacheTests.test_anonymous_question_cache

This fact confuses me because someone taught me that each unittest should be independent of one another. However, the above results suggest that askbot tests are not independent of one another. Again, any thoughts will be appreciated.