-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2392 from ned2/dash-pages-path-fixes
Dash Pages bug fixes and enhancements for dash_pages param and layout module imports
- Loading branch information
Showing
18 changed files
with
313 additions
and
79 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
import os | ||
|
||
import pytest | ||
import dash | ||
from dash._configs import DASH_ENV_VARS | ||
|
||
|
||
@pytest.fixture | ||
def empty_environ(): | ||
for k in DASH_ENV_VARS.keys(): | ||
if k in os.environ: | ||
os.environ.pop(k) | ||
|
||
|
||
@pytest.fixture | ||
def clear_pages_state(): | ||
init_pages_state() | ||
yield | ||
init_pages_state() | ||
|
||
|
||
def init_pages_state(): | ||
"""Clear all global state that is used by pages feature.""" | ||
dash._pages.PAGE_REGISTRY.clear() | ||
dash._pages.CONFIG.clear() | ||
dash._pages.CONFIG.__dict__.clear() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.