Skip to content

Commit 71a233b

Browse files
authored
Merge pull request #1249 from plotly/919-pytest-flake8
fix #919 - protect against pytest item with no funcargs
2 parents 308dece + 19abd58 commit 71a233b

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ This project adheres to [Semantic Versioning](http://semver.org/).
1010
- [#1237](https://github.com/plotly/dash/pull/1237) Closes [#920](https://github.com/plotly/dash/issues/920): Converts hot reload fetch failures into a server status indicator showing whether the latest fetch succeeded or failed. Callback fetch failures still appear as errors but have a clearer message.
1111

1212
### Fixed
13+
- [#1249](https://github.com/plotly/dash/pull/1249) Fixes [#919](https://github.com/plotly/dash/issues/919) so `dash.testing` is compatible with more `pytest` plugins, particularly `pytest-flake8` and `pytest-black`.
1314
- [#1248](https://github.com/plotly/dash/pull/1248) Fixes [#1245](https://github.com/plotly/dash/issues/1245), so you can use prop persistence with components that have dict IDs, ie for pattern-matching callbacks.
1415

1516
## [1.12.0] - 2020-05-05

dash/testing/plugin.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ def pytest_runtest_makereport(item, call): # pylint: disable=unused-argument
7575
rep = outcome.get_result()
7676

7777
# we only look at actual failing test calls, not setup/teardown
78-
if rep.when == "call" and rep.failed:
78+
if rep.when == "call" and rep.failed and hasattr(item, "funcargs"):
7979
for name, fixture in item.funcargs.items():
8080
try:
8181
if name in {"dash_duo", "dash_br", "dashr"}:

0 commit comments

Comments
 (0)