-
Notifications
You must be signed in to change notification settings - Fork 39
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add test to make sure we don't import aiohttp
- Loading branch information
Showing
3 changed files
with
22 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import subprocess | ||
import sys | ||
|
||
|
||
def test_slow_dependencies_local(supports_dir): | ||
# Make sure that "import modal" doesn't load some big dependencies like aiohttp | ||
subprocess.check_output([sys.executable, supports_dir / "slow_dependencies_local.py"]) | ||
|
||
|
||
def test_slow_dependencies_container(supports_dir): | ||
# Make sure that "import modal._container_entrypoint" doesn't load some big dependencies like aiohttp | ||
subprocess.check_output([sys.executable, supports_dir / "slow_dependencies_container.py"]) |
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,5 @@ | ||
import sys | ||
|
||
# This is a very heavy dependency that takes about 70-80ms to import | ||
# Let's make sure it doesn't get imported in global scope | ||
assert "aiohttp" not in sys.modules |
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,5 @@ | ||
import sys | ||
|
||
# This is a very heavy dependency that takes about 70-80ms to import | ||
# Let's make sure it doesn't get imported in global scope | ||
assert "aiohttp" not in sys.modules |