Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: check that no remote backend modules are loaded by default #3400

Merged
merged 1 commit into from
Feb 28, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions tests/unit/test_imports.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import subprocess


def test_no_remote_imports():
remote_modules = {
"boto3",
Suor marked this conversation as resolved.
Show resolved Hide resolved
"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