jazzband / django-debug-toolbar

A configurable set of panels that display various debug information about the current request/response.
https://django-debug-toolbar.readthedocs.io/
BSD 3-Clause "New" or "Revised" License
7.97k stars 1.03k forks source link

Make tox pass selenium environment variables #1892

Closed living180 closed 3 months ago

living180 commented 3 months ago

Description

When running tox, pass through the user's DISPLAY and DJANGO_SELENIUM_TESTS environment variables, so that

DJANGO_SELENIUM_TESTS=true tox

will actually run the Selenuim integration tests. Without this change, the test suite never sees the DJANGO_SELENIUM_TESTS variable and thus skips the integration tests. Without DISPLAY, the integration tests will error out (unless CI is present in the environment to instruct the test suite to run the Selenium webdriver in headless mode).

Checklist:

tim-schilling commented 3 months ago

I think we previously left the selenium tests off because they're a bit burdensome to run locally.

living180 commented 3 months ago

Yes, this PR isn't changing that default, it is just making it possible to enable them through tox if desired. Right now the Contributing docs includes the following snippet:

image

The first two lines using make work, but the third using tox doesn't without this change, since tox won't pass through the DJANGO_SELENIUM_TESTS variable without it.