Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tests pass but process doesn't terminate #20

Open
altendky opened this issue Sep 11, 2018 · 2 comments
Open

Tests pass but process doesn't terminate #20

altendky opened this issue Sep 11, 2018 · 2 comments

Comments

@altendky
Copy link
Member

altendky commented Sep 11, 2018

When running with v0.5 my tests pass but the process won't end. With fcc4186 (@exarkun) reverted they pass and the process ends.

Builds passing: https://travis-ci.org/altendky/altendpyqt5/builds/427012146
My 'fixed' branch: ce3ea2d

https://gist.github.com/altendky/15cc377d88ae3635a1597fba770ed9f0

 ~/altendpyqt5   6-signal_deferred ●  git rev-parse HEAD
47ea0b23dea0e82fca11f66265e679c86f872e14
 ~/altendpyqt5   6-signal_deferred ●  gd requirements.test
diff --git a/requirements.test b/requirements.test
index 6612d83..644a196 100644
--- a/requirements.test
+++ b/requirements.test
@@ -25,7 +25,7 @@ pytest-qt==3.0.2
 pytest-twisted==1.8
 pytest-xvfb==1.1.0
 PyVirtualDisplay==0.2.1
-git+https://github.com/altendky/qt5reactor@a52c0d0c289c8e08680c0204974081c541504d41#egg=qt5reactor
+qt5reactor
 requests==2.19.1
 six==1.11.0
 tox==3.2.1
 ~/altendpyqt5   6-signal_deferred ●  venv/bin/pytest -vvvvvvvv -s altendpyqt5.tests --reactor=qt5reactor -m twisted --pyargs
================================================================================ test session starts =================================================================================
platform linux -- Python 3.6.6, pytest-3.7.4, py-1.6.0, pluggy-0.7.1 -- /home/altendky/altendpyqt5/venv/bin/python3.6
cachedir: .pytest_cache
PyQt5 5.11.2 -- Qt runtime 5.11.1 -- Qt compiled 5.11.1
rootdir: /home/altendky/altendpyqt5, inifile:
plugins: xvfb-1.1.0, twisted-1.8, qt-3.0.2, cov-2.5.1, asyncio-0.9.0
collected 18 items / 14 deselected                                                                                                                                                   

src/altendpyqt5/tests/test_twisted.py::test_yield_for_signal PASSED
src/altendpyqt5/tests/test_twisted.py::test_yield_for_signal_arguments PASSED
src/altendpyqt5/tests/test_twisted.py::test_await_for_signal PASSED
src/altendpyqt5/tests/test_twisted.py::test_await_for_signal_result PASSED^CUnhandled Error
Traceback (most recent call last):
  File "/home/altendky/altendpyqt5/venv/lib/python3.6/site-packages/twisted/python/context.py", line 122, in callWithContext
    return self.currentContext().callWithContext(ctx, func, *args, **kw)
  File "/home/altendky/altendpyqt5/venv/lib/python3.6/site-packages/twisted/python/context.py", line 85, in callWithContext
    return func(*args,**kw)
  File "/home/altendky/altendpyqt5/venv/lib/python3.6/site-packages/qt5reactor.py", line 165, in _read
    self.reactor._iterate(fromqt=True)
  File "/home/altendky/altendpyqt5/venv/lib/python3.6/site-packages/qt5reactor.py", line 271, in _iterate
    self.runUntilCurrent()
--- <exception caught here> ---
  File "/home/altendky/altendpyqt5/venv/lib/python3.6/site-packages/twisted/internet/base.py", line 869, in runUntilCurrent
    f(*a, **kw)
  File "/home/altendky/altendpyqt5/venv/lib/python3.6/site-packages/twisted/internet/base.py", line 630, in stop
    "Can't stop reactor that isn't running.")
twisted.internet.error.ReactorNotRunning: Can't stop reactor that isn't running.



====================================================================== 4 passed, 14 deselected in 7.73 seconds =======================================================================
@exarkun
Copy link
Member

exarkun commented Sep 11, 2018

Any chance you can attach a minimal reproducing test suite to this issue?

@altendky
Copy link
Member Author

Is the repo for the linked/quoted tests sufficient? I pushed a copy that uses qt5reactor==0.5 and hangs indefinitely on the Twisted tests.

altendky/alqtendpy@d316ac5
https://travis-ci.org/altendky/altendpyqt5/builds/427155906?utm_source=github_status&utm_medium=notification

The relevant files are:
https://github.com/altendky/altendpyqt5/blob/d316ac5090a73f7cb0137ea5fff56a6d4769289e/src/altendpyqt5/twisted.py
https://github.com/altendky/altendpyqt5/blob/d316ac5090a73f7cb0137ea5fff56a6d4769289e/src/altendpyqt5/tests/test_twisted.py
https://github.com/altendky/altendpyqt5/blob/d316ac5090a73f7cb0137ea5fff56a6d4769289e/src/altendpyqt5/tests/utils.py

I know it isn't what you are requesting here but qt5reactor should definitely have a test setup so I'll go ahead and do that now. Then we can just add demonstrative tests to it when we need rather than making examples on the side that won't get regression checked. See #21. If you want to wait for this I'm fine with that. I've been using my fork for quite awhile so no harm doing so a bit longer. :]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants