Skip to content

Commit aad1aac

Browse files
authored
Merge pull request #2046 from plotly/fix-import-error
Fix import error
2 parents 45e35aa + 7793807 commit aad1aac

File tree

2 files changed

+17
-1
lines changed

2 files changed

+17
-1
lines changed

CHANGELOG.md

+6
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,12 @@
22
All notable changes to `dash` will be documented in this file.
33
This project adheres to [Semantic Versioning](https://semver.org/).
44

5+
## [UNRELEASED]
6+
7+
### Fixed
8+
9+
- Fix [#2045](https://github.com/plotly/dash/issues/2045) import error when using pytest but `dash[testing]` is not installed.
10+
511
## [2.4.0] - 2022-05-11
612

713
### Added

dash/testing/plugin.py

+11-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
# pylint: disable=missing-docstring,redefined-outer-name
2+
from typing import Any
3+
24
import pytest
35
from .consts import SELENIUM_GRID_DEFAULT
46

@@ -13,7 +15,15 @@
1315
from dash.testing.browser import Browser
1416
from dash.testing.composite import DashComposite, DashRComposite, DashJuliaComposite
1517
except ImportError:
16-
pass
18+
# Running pytest without dash[testing] installed.
19+
ThreadedRunner = Any
20+
ProcessRunner = Any
21+
RRunner = Any
22+
JuliaRunner = Any
23+
Browser = Any
24+
DashComposite = Any
25+
DashRComposite = Any
26+
DashJuliaComposite = Any
1727

1828

1929
def pytest_addoption(parser):

0 commit comments

Comments
 (0)