Skip to content
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

Fix import error #2046

Merged
merged 2 commits into from
May 11, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@
All notable changes to `dash` will be documented in this file.
This project adheres to [Semantic Versioning](https://semver.org/).

## [UNRELEASED]

### Fixed

- Fix [#2045](https://github.com/plotly/dash/issues/2045) import error when using pytest but `dash[testing]` is not installed.

## [2.4.0] - 2022-05-11

### Added
Expand Down
12 changes: 11 additions & 1 deletion dash/testing/plugin.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
# pylint: disable=missing-docstring,redefined-outer-name
from typing import Any

import pytest
from .consts import SELENIUM_GRID_DEFAULT

Expand All @@ -13,7 +15,15 @@
from dash.testing.browser import Browser
from dash.testing.composite import DashComposite, DashRComposite, DashJuliaComposite
except ImportError:
pass
# Running pytest without dash[testing] installed.
ThreadedRunner = Any
ProcessRunner = Any
RRunner = Any
JuliaRunner = Any
Browser = Any
DashComposite = Any
DashRComposite = Any
DashJuliaComposite = Any


def pytest_addoption(parser):
Expand Down