diff --git a/CHANGELOG.md b/CHANGELOG.md index 4a97fb00db..a57e48e0f7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 diff --git a/dash/testing/plugin.py b/dash/testing/plugin.py index 2fd5b7a21c..4265589259 100644 --- a/dash/testing/plugin.py +++ b/dash/testing/plugin.py @@ -1,4 +1,6 @@ # pylint: disable=missing-docstring,redefined-outer-name +from typing import Any + import pytest from .consts import SELENIUM_GRID_DEFAULT @@ -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):