import: drop --file (#9562)

This commit is contained in:
Dave Berenbaum
2023-06-09 10:03:32 +05:45
committed by GitHub
parent ed664143b4
commit 528eab0418
7 changed files with 3 additions and 48 deletions
-16
View File
@@ -63,22 +63,6 @@ def test_import_conflict_and_override(tmp_dir, dvc):
assert os.path.exists("bar.dvc")
def test_import_filename(tmp_dir, dvc, cloud):
external_source = cloud / "file"
(cloud / "file").write_text("content", encoding="utf-8")
ret = main(["import-url", "--file", "bar.dvc", external_source.fs_path])
assert ret == 0
assert (tmp_dir / "bar.dvc").exists()
(tmp_dir / "bar.dvc").unlink()
(tmp_dir / "sub").mkdir()
path = tmp_dir / "sub" / "bar.dvc"
ret = main(["import-url", "--file", path.fs_path, external_source.fs_path, "out"])
assert ret == 0
assert path.exists()
@pytest.mark.parametrize("dname", [".", "dir", "dir/subdir"])
def test_import_url_to_dir(dname, tmp_dir, dvc):
tmp_dir.gen({"data_dir": {"file": "file content"}})
-9
View File
@@ -10,8 +10,6 @@ def test_import(mocker):
"src",
"--out",
"out",
"--file",
"file",
"--rev",
"version",
"--jobs",
@@ -29,7 +27,6 @@ def test_import(mocker):
"repo_url",
path="src",
out="out",
fname="file",
rev="version",
no_exec=False,
no_download=False,
@@ -45,8 +42,6 @@ def test_import_no_exec(mocker):
"src",
"--out",
"out",
"--file",
"file",
"--rev",
"version",
"--no-exec",
@@ -62,7 +57,6 @@ def test_import_no_exec(mocker):
"repo_url",
path="src",
out="out",
fname="file",
rev="version",
no_exec=True,
no_download=False,
@@ -78,8 +72,6 @@ def test_import_no_download(mocker):
"src",
"--out",
"out",
"--file",
"file",
"--rev",
"version",
"--no-download",
@@ -95,7 +87,6 @@ def test_import_no_download(mocker):
"repo_url",
path="src",
out="out",
fname="file",
rev="version",
no_exec=False,
no_download=True,
-7
View File
@@ -13,8 +13,6 @@ def test_import_url(mocker):
"import-url",
"src",
"out",
"--file",
"file",
"--jobs",
"4",
]
@@ -29,7 +27,6 @@ def test_import_url(mocker):
m.assert_called_once_with(
"src",
out="out",
fname="file",
no_exec=False,
no_download=False,
remote=None,
@@ -70,8 +67,6 @@ def test_import_url_no_exec_download_flags(mocker, flag, expected):
flag,
"src",
"out",
"--file",
"file",
]
)
@@ -83,7 +78,6 @@ def test_import_url_no_exec_download_flags(mocker, flag, expected):
m.assert_called_once_with(
"src",
out="out",
fname="file",
remote=None,
to_remote=False,
jobs=None,
@@ -114,7 +108,6 @@ def test_import_url_to_remote(mocker):
m.assert_called_once_with(
"s3://bucket/foo",
out="bar",
fname=None,
no_exec=False,
no_download=False,
remote="remote",