Skip to content

pytest-django fails pytest (django.core.exceptions.ImproperlyConfigured) #599

Closed
@hkveeranki

Description

@hkveeranki
  • I installed both pytest and pytest-django libraries in my laptop. Then I wanted to run pytest in a folder in which tests have no dependency of django.
    • Expected: I expected everything to run smoothing
    • What actually happeened? pytest failed with the error
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.
  • Pytest version: 3.5.1, Operating System : Ubuntu Linux 18.04 LTS, python version - 3.6.5

I don't know whether this is an intended feature or a bug.

I reported it in pytest repo. They asked me to report it here.

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