Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ENH: Set __module__ attribute on exported functions (Fixes #968)
This causes the functions to show up under the proper namespace, rather than the original module, when printed in IPython/notebook.
- Loading branch information
1 parent
4acc25b
commit fe0a7f9
Showing
6 changed files
with
52 additions
and
1 deletion.
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,17 @@ | ||
# Copyright (c) 2018 MetPy Developers. | ||
# Distributed under the terms of the BSD 3-Clause License. | ||
# SPDX-License-Identifier: BSD-3-Clause | ||
"""Test packaging details.""" | ||
|
||
from metpy.calc import tke | ||
from metpy.interpolate import interpolate | ||
from metpy.io import Level2File | ||
from metpy.plots import StationPlot | ||
|
||
|
||
def test_modules_set(): | ||
"""Test that functions from each subpackage have correct module set.""" | ||
assert Level2File.__module__ == 'metpy.io' | ||
assert StationPlot.__module__ == 'metpy.plots' | ||
assert interpolate.__module__ == 'metpy.interpolate' | ||
assert tke.__module__ == 'metpy.calc' |