#18882: ValueError when running a test inside a thread
-----------------------------------+--------------------
Reporter: ebas | Owner: nobody
Type: Bug | Status: new
Component: Testing framework | Version: 1.3
Severity: Normal | Keywords:
Triage Stage: Unreviewed | Has patch: 1
Easy pickings: 0 | UI/UX: 0
-----------------------------------+--------------------
When running tests, unittest.installHandler is called to catch SIGINT.
This is impossible when it's not on the main thread, and will throw a
ValueError.
Running tests inside a thread occurs, for example, when used in conjuction
with autoreload, as used in:
*
https://github.com/rca/django/commit/043e9723ae8fdb98745c2390f3ff92649bc106df
* https://github.com/garethr/django-test-extensions
Using either of these will result in a ValueError.
One might argue this is an unittest bug, but i disagree. Unittest doesn't
automatically install this handler, therefor its the users (django)
responsibility to use it appropriately.
Branch on github: https://github.com/ebas/django/tree/fix/simple.py-
valueerror
--
Ticket URL: <https://code.djangoproject.com/ticket/18882>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit https://groups.google.com/groups/opt_out.