Skip to content

pytest plugin runs even when irrelevant #703

@jayvdb

Description

@jayvdb

Describe the bug
pytest plugin runs even when irrelevant.

pytest --help
..
  File "/usr/lib/python3.8/site-packages/nameko/testing/pytest.py", line 80, in pytest_load_initial_conftests
    eventlet.monkey_patch()
  File "/usr/lib/python3.8/site-packages/eventlet/patcher.py", line 271, in monkey_patch
    _green_existing_locks()
  File "/usr/lib/python3.8/site-packages/eventlet/patcher.py", line 362, in _green_existing_locks
    if isinstance(obj, rlock_type):
  File "/usr/lib/python3.8/site-packages/django/utils/functional.py", line 224, in inner
    self._setup()
  File "/usr/lib/python3.8/site-packages/django/conf/__init__.py", line 57, in _setup
    raise ImproperlyConfigured(
django.core.exceptions.ImproperlyConfigured: Requested settings, but settings are not configured. You must either define the environment variable DJANGO_SETTINGS_MODULE or call settings.configure() before accessing settings.

To Reproduce

  1. Install nameko
  2. Go to a directory unrelated to nameko
  3. run pytest --help

Expected behavior
nameko plugin should expose its options, but otherwise do nothing.

Environment (please complete the following information):

  • Nameko version: 2.13.0
  • Python version: 3.8
  • OS: Linux

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