Skip to content

DeprecationWarning: reactor.iterate cannot be used inside unit tests. In the future, using iterate will fail the test and may crash or hang the test run. #43

@altendky

Description

@altendky

https://github.com/pytest-dev/pytest-twisted/pull/94/checks?check_run_id=692810777

============================= test session starts ==============================
platform linux -- Python 3.6.10, pytest-5.4.2, py-1.8.1, pluggy-0.13.1 -- /__w/pytest-twisted/pytest-twisted/.tox/py36-qt5reactor/bin/python
cachedir: .pytest_cache
PyQt5 5.14.2 -- Qt runtime 5.14.2 -- Qt compiled 5.14.2
rootdir: /tmp/pytest-of-root/pytest-0/test_scrapy____something0
plugins: qt-3.3.0, xvfb-1.2.0, twisted-1.12
collecting ... collected 1 item

test_scrapy____something.py::Test::test PASSED                           [100%]

=============================== warnings summary ===============================
test_scrapy____something.py::Test::test
  /__w/pytest-twisted/pytest-twisted/.tox/py36-qt5reactor/lib/python3.6/site-packages/qt5reactor/core.py:292: DeprecationWarning: reactor.iterate cannot be used inside unit tests. In the future, using iterate will fail the test and may crash or hang the test run.
    self.iterate(delay=delay, fromqt=True)

-- Docs: https://docs.pytest.org/en/latest/warnings.html
========================= 1 passed, 1 warning in 0.10s =========================

https://github.com/sunu/qt5reactor/blob/8aaf354ef5d5ec07aca4fbe3c4ec9fba2c476ee9/src/qt5reactor/core.py#L291-L292

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions