This can also occur if 
- you are running your tests in parallel (eg; python manage.py test 
--parallel=3`)
-  and there's an import error.
In such a case; your test runner is unable to report the import error and 
instead reports a _pickle.PicklingError.
This happens because of this bug(https://bugs.python.org/issue31297) in 
python. The bug appears to have been fixed in python2 but was NOT 
backported to python2.7

To detect the actual import error; run your tests in sequence(--parallel=1)


On Monday, 29 February 2016 20:13:08 UTC+3, girish ramnani wrote:
>
> when running the django test in parallel using the runner.py . 
> _pickle.PicklingError: Can't pickle <class 
> 'unittest.loader.ModuleImportFailure'>: attribute lookup 
> ModuleImportFailure on unittest.loader failed
>
> error is thrown, and when the runner is run using a single process. the 
> test suite executes.
>
> I am using a new virtualenv with django installed in editable mode.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/dc7e4cca-fb20-49ad-ade5-bdc347d213f0%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to