Skip to content

Already imported module #2992

Closed
Closed
@keller00

Description

@keller00

Hey!
I'm trying to migrate over my tests from nose to pytest to test my twisted application.

This site says:
If a plugin is installed, pytest automatically finds and integrates it, there is no need to activate it.
So according to this all I have to do is pip install pytest-twisted, but when I try running my tests I get:
AttributeError: 'module' object has no attribute 'inlineCallbacks'

So on this site it says to put the following into conftest.py:
pytest_plugins = "pytest_twisted"
So I make conftest.py next to my testing Python file in the tests folder and get the following warning:

None
  Module already imported so can not be re-written: pytest_twisted

-- Docs: http://doc.pytest.org/en/latest/warnings.html

It seems like it auto discovers the plugin, but doesn't update itself with inlinecallback without reimporting it? Would this be a bug, or just me not understanding something properly?

Any help is appreciated! Thank you!

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