Hi there!
I'm trying to add some tests to my PR
(
https://github.com/edx/edx-platform/pull/13441) and I really could
use some help. First, I'm trying to understand how to execute a single
test (and not all the tests available).
In fact, I succeeded executing a single test using this command from
the documentation page:
$ python ./manage.py lms test --verbosity=1
lms/djangoapps/courseware/tests/test_courses.py --settings=test
But it takes 21 minutes to run it! Am I doing something wrong? Do I
need 20 minutes each time I want to check a single test? o_O
On the other hand, if I add the --traceback option to that command
(as seen here:
https://github.com/edx/edx-platform/blob/master/docs/en_us/internal/testing.rst
)
$ python ./manage.py lms test --verbosity=1
openedx/core/djangoapps/lang_pref/tests/test_middleware.py --traceback
--settings=test
I get this error:
manage.py: error: no such option: --traceback
Finally, if I execute this test (this is the test that I really want
to modifiy, but first, I want to double-check that the original test
runs flawlessly):
$ python ./manage.py lms test --verbosity=1
openedx/core/djangoapps/lang_pref/tests/test_middleware.py
--settings=test
It fails, but I can't see the reason (the test shows a long series of
DEBUG statements related to django.db.backends.schema, as seen here:
http://pastebin.com/v8y9DgGQ ) and finally a FAILED (errors=1)
message, but I can't see exactly which specific test has failed and
why.
I also tried to redirect the output of the long error message to a file, using
.... 2>&1 >/tmp/errors
but it seems to ignore my capture attempt :-\
Any help will be greatly appreciated.
--
Greetings,
Juanan Pereira