mirror of
https://github.com/Stone-Red-Code/dvc.git
synced 2026-11-02 07:18:25 +01:00
By splitting dvc.cli into a module, we'll be able to share cli-related utilities, split parser-related stuffs into smaller parts, improve reusability and improve API for command extensions in the future.
23 lines
520 B
Python
23 lines
520 B
Python
import subprocess
|
|
import sys
|
|
|
|
|
|
def test_no_remote_imports():
|
|
remote_modules = {
|
|
"boto3",
|
|
"botocore",
|
|
"google.cloud.storage",
|
|
"azure.storage.blob",
|
|
"oss2",
|
|
"pydrive2",
|
|
"paramiko",
|
|
"pyarrow",
|
|
}
|
|
|
|
code = "import dvc.cli, sys; print(' '.join(sys.modules))"
|
|
res = subprocess.run(
|
|
[sys.executable, "-c", code], stdout=subprocess.PIPE, check=True
|
|
)
|
|
modules = res.stdout.decode().split()
|
|
assert not set(modules) & remote_modules
|