Skip to content

Commit 1b4d1a3

Browse files
committed
Add hook cleanup for tests.
1 parent 54d338d commit 1b4d1a3

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

tests/integration/test_hooks.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,19 @@
11
from flask import jsonify
22
import requests
3+
import pytest
34

45
from dash import Dash, Input, Output, html, hooks, set_props
56

67

8+
@pytest.fixture(scope="module", autouse=True)
9+
def hook_cleanup():
10+
hooks._ns["layout"] = []
11+
hooks._ns["setup"] = []
12+
hooks._ns["route"] = []
13+
hooks._ns["error"] = []
14+
hooks._ns["callback"] = []
15+
16+
717
def test_hook001_layout(dash_duo):
818
@hooks.layout
919
def on_layout(layout):

0 commit comments

Comments
 (0)