mirror of
https://github.com/Stone-Red-Code/dvc.git
synced 2026-11-02 07:18:25 +01:00
test: check that no remote backend modules are loaded by default (#3400)
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
import subprocess
|
||||
|
||||
|
||||
def test_no_remote_imports():
|
||||
remote_modules = {
|
||||
"boto3",
|
||||
"botocore",
|
||||
"google.cloud.storage",
|
||||
"azure.storage.blob",
|
||||
"oss2",
|
||||
"pydrive2",
|
||||
"paramiko",
|
||||
"pyarrow",
|
||||
}
|
||||
|
||||
code = "import dvc.main, sys; print(' '.join(sys.modules))"
|
||||
res = subprocess.run(["python", "-c", code], stdout=subprocess.PIPE)
|
||||
modules = res.stdout.decode().split()
|
||||
assert not set(modules) & remote_modules
|
||||
Reference in New Issue
Block a user