You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This looked rather dodgy as it appears, at first glance, to be changing the event loop in the middle of a handler, which you'd expect to break a lot of things.
However, in reality, the loop_without_sendfile fixture modifies the object from the loop fixture, which will be the default loop currently running. Which means that the loop has always been modified and this set_event_loop() call is a no-op.
That means the fixture is causing all the tests to be run twice under the exact same conditions. There is no test case where the sendfile has not been patched out. The fixtures need to be reworked to make this behave correctly, and a regression test for the fixture needs to be added.
The text was updated successfully, but these errors were encountered:
We have this code in a fixture:
aiohttp/tests/test_web_sendfile_functional.py
Lines 75 to 76 in 8a525d9
This looked rather dodgy as it appears, at first glance, to be changing the event loop in the middle of a handler, which you'd expect to break a lot of things.
However, in reality, the
loop_without_sendfile
fixture modifies the object from theloop
fixture, which will be the default loop currently running. Which means that the loop has always been modified and this set_event_loop() call is a no-op.That means the fixture is causing all the tests to be run twice under the exact same conditions. There is no test case where the sendfile has not been patched out. The fixtures need to be reworked to make this behave correctly, and a regression test for the fixture needs to be added.
The text was updated successfully, but these errors were encountered: