Closed valeedmalik closed 3 years ago
python-engineio==3.12.1
python-socketio==4.5.1
as per https://plugins.jetbrains.com/plugin/13264-pycrunch--live-testing/reviews
upon triggering test
INFO Running tests...
INFO collecting 1 tests for run
DEBUG Received task in queue
INFO tests_will_run
INFO notify_clients_about_tests_change
INFO total_tests_to_run 1
INFO process_single_message - handshake
[25] [task_id: afed567f-0fcd-427a-98fa-2ac767d96218] Data received: test-run-task;
INFO process_single_message - test_run_results
INFO process_single_message - timings
INFO process_single_message - close
[25] [task_id: afed567f-0fcd-427a-98fa-2ac767d96218] - The connection to parent pycrunch-engine process lost
WARNING Executing <Handle BaseSelectorEventLoop._read_from_self()> took 0.188 seconds
INFO notify_clients_about_tests_change
Hello, thanks for detailed report.
I was able to reproduce the issue using the latest Django (3.1.4)
I will provide more details after investigation.
Quick workaround would be setting DJANGO_ALLOW_ASYNC_UNSAFE
env variable in .pycrunch-config.yaml
, such as:
engine:
runtime: django
env:
DJANGO_SETTINGS_MODULE: django31.settings
DJANGO_ALLOW_ASYNC_UNSAFE: "true"
Thanks that will work my purposes. I appreciate the quick response.
I have the same error , but I don't have the file! how can I solve it?
@shakori999 this file will be created at the first run of the engine in the root directory of the project.
You might have an old version of package (when configuration file is not created automatically), make sure to update via
pip install --upgrade pycrunch-engine
If I run
manage.py test
, that will work as expected however when running via pycrunch IJ plugin I see this:django.core.exceptions.SynchronousOnlyOperation: You cannot call this from an async context - use a thread or sync_to_async.
django==3.1.4
actual test:
full error output: