Skip to content

Pytest fails because of pytest_django #3508

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

Closed
hkveeranki opened this issue May 25, 2018 · 2 comments
Closed

Pytest fails because of pytest_django #3508

hkveeranki opened this issue May 25, 2018 · 2 comments
Labels
platform: mac mac platform-specific problem type: bug problem that needs to be addressed type: question general question, might be closed after 2 weeks of inactivity

Comments

@hkveeranki
Copy link

hkveeranki commented May 25, 2018

  • 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

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

@pytestbot pytestbot added the type: question general question, might be closed after 2 weeks of inactivity label May 25, 2018
@pytestbot
Copy link
Contributor

GitMate.io thinks possibly related issues are #2202 (Pytest fails to capture doctest traceback?), #955 (pytest fails to register pytest-cov), #1045 (pytest-warnings fails tests since 2.8), #2040 (isfile check fails within pytest), and #2114 (Could pytest --last-failed skip test collection?).

@pytestbot pytestbot added platform: mac mac platform-specific problem type: bug problem that needs to be addressed labels May 25, 2018
@nicoddemus
Copy link
Member

Seems to me like this is pytest-django specific, would you mind report this issue there? Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
platform: mac mac platform-specific problem type: bug problem that needs to be addressed type: question general question, might be closed after 2 weeks of inactivity
Projects
None yet
Development

No branches or pull requests

3 participants