-
-
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 #1493 from plotly/import-test
improve dash import test
- Loading branch information
Showing
7 changed files
with
34 additions
and
35 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,11 @@ | ||
from .dash import Dash, no_update # noqa: F401 | ||
from . import dependencies # noqa: F401 | ||
from . import development # noqa: F401 | ||
from . import exceptions # noqa: F401 | ||
from . import resources # noqa: F401 | ||
from .version import __version__ # noqa: F401 | ||
from ._callback_context import callback_context # noqa: F401 | ||
# pylint: disable=C0413 | ||
# __plotly_dash is for the "make sure you don't have a dash.py" check | ||
# must come before any other imports. | ||
__plotly_dash = True | ||
from .dash import Dash, no_update # noqa: F401,E402 | ||
from . import dependencies # noqa: F401,E402 | ||
from . import development # noqa: F401,E402 | ||
from . import exceptions # noqa: F401,E402 | ||
from . import resources # noqa: F401,E402 | ||
from .version import __version__ # noqa: F401,E402 | ||
from ._callback_context import callback_context # noqa: F401,E402 |
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,15 @@ | ||
# NOTE: this is NOT a pytest test. Just run it as a regular Python script. | ||
# pytest does some magic that makes the issue we're trying to test disappear. | ||
|
||
import types | ||
import os | ||
|
||
import dash | ||
|
||
assert isinstance(dash, types.ModuleType), "dash can be imported" | ||
|
||
this_dir = os.path.dirname(__file__) | ||
with open(os.path.join(this_dir, "../../../dash/version.py")) as fp: | ||
assert dash.__version__ in fp.read(), "version is consistent" | ||
|
||
assert getattr(dash, "Dash").__name__ == "Dash", "access to main Dash class is valid" |
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,3 @@ | ||
# used implicitly by dash_import_test | ||
# to test https://github.com/plotly/dash/issues/1143 | ||
import dash_core_components as dcc # noqa: F401 |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.