-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add a test for validating that the docstring of the main component is consistent with that of the auto-generated component.
- Loading branch information
Showing
3 changed files
with
67 additions
and
0 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 |
---|---|---|
@@ -0,0 +1,40 @@ | ||
# -*- coding: UTF-8 -*- | ||
""" | ||
Docstring | ||
========= | ||
@ Dash JSON Grid Viewer - Tests | ||
Author | ||
------ | ||
Yuchen Jin (cainmagi) | ||
cainmagi@gmail.com | ||
Description | ||
----------- | ||
The tests for validating the consistency between the docstrings of the main component | ||
and the auto-generated comonent. | ||
""" | ||
|
||
import logging | ||
|
||
from dash_json_grid import DashJsonGrid | ||
from dash_json_grid.DashJsonGrid import DashJsonGrid as _DashJsonGrid | ||
|
||
from . import utils | ||
|
||
|
||
__all__ = ("TestDocstring",) | ||
|
||
|
||
class TestDocstring: | ||
"""Test the consistency between the mixin-merged component and the auto-genrated | ||
component.""" | ||
|
||
def test_docstring_components(self) -> None: | ||
"""Test the comparison between the docstrings of the components.""" | ||
log = logging.getLogger("dash_json_grid.test") | ||
|
||
assert utils.docstring_space_remove( | ||
DashJsonGrid | ||
) == utils.docstring_space_remove(_DashJsonGrid) | ||
log.info("Confirm that {0}.__doc__ is valid.".format(DashJsonGrid.__name__)) |
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