-
-
Notifications
You must be signed in to change notification settings - Fork 74
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: Don’t directly import numpy and add
gen_types
decorator (#…
…966)
- Loading branch information
Showing
5 changed files
with
114 additions
and
42 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
import sys | ||
from subprocess import check_output | ||
from textwrap import dedent | ||
|
||
|
||
def test_no_blocklist_imports(): | ||
check = """\ | ||
import sys | ||
import param | ||
blocklist = {"numpy", "IPython", "pandas"} | ||
mods = blocklist & set(sys.modules) | ||
if mods: | ||
print(", ".join(mods), end="") | ||
""" | ||
|
||
output = check_output([sys.executable, '-c', dedent(check)]) | ||
|
||
assert output == b"" |
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