Skip to content

Commit 4efd048

Browse files
committed
test: try removing get_url test
1 parent 46391cb commit 4efd048

File tree

1 file changed

+0
-30
lines changed

1 file changed

+0
-30
lines changed

tests/func/test_get_url.py

Lines changed: 0 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,10 @@
11
from __future__ import unicode_literals
22

33
import os
4-
import boto3
54
import filecmp
65

76
import pytest
87

9-
from moto import mock_s3
10-
11-
from dvc.remote import RemoteS3
128
from dvc.repo import Repo
139
from dvc.utils import makedirs
1410

@@ -36,29 +32,3 @@ def test_get_url_to_dir(dname, repo_dir):
3632

3733
assert os.path.isdir(dname)
3834
assert filecmp.cmp(repo_dir.DATA, dst, shallow=False)
39-
40-
41-
@pytest.mark.parametrize("dst", [".", "./from"])
42-
def test_get_url_from_non_local_path_to_dir_and_file(repo_dir, dst):
43-
with mock_s3():
44-
file_name = "from"
45-
file_content = "data"
46-
base_info = RemoteS3.path_cls("s3://bucket/path")
47-
from_info = base_info / file_name
48-
49-
s3 = boto3.client("s3")
50-
s3.create_bucket(Bucket=from_info.bucket)
51-
s3.put_object(
52-
Bucket=from_info.bucket, Key=from_info.path, Body=file_content
53-
)
54-
55-
Repo.get_url(from_info.url, dst)
56-
57-
result_path = (
58-
os.path.join(dst, file_name) if os.path.isdir(dst) else dst
59-
)
60-
61-
assert os.path.exists(result_path)
62-
assert os.path.isfile(result_path)
63-
with open(result_path, "r") as fd:
64-
assert fd.read() == file_content

0 commit comments

Comments
 (0)