From 2c4aee9b8baacbd2a7b448b3205568fb6316aaa2 Mon Sep 17 00:00:00 2001 From: David de la Iglesia Castro Date: Wed, 4 May 2022 17:43:39 +0200 Subject: [PATCH 1/2] test_dvc: Add TestImportHDFS and TestAddHDFS. Fix unintentional skips. --- dvc_hdfs/tests/test_dvc.py | 42 ++++++++++++++++++-------------------- 1 file changed, 20 insertions(+), 22 deletions(-) diff --git a/dvc_hdfs/tests/test_dvc.py b/dvc_hdfs/tests/test_dvc.py index 1c3d3c9..1db1b22 100644 --- a/dvc_hdfs/tests/test_dvc.py +++ b/dvc_hdfs/tests/test_dvc.py @@ -24,31 +24,29 @@ def workspace(make_workspace, cloud_name): yield make_workspace(name="workspace", typ=cloud_name) -@pytest.fixture -def stage_md5(): - return "ec0943f83357f702033c98e70b853c8c" - - -@pytest.fixture -def is_object_storage(): - return False - +class TestImportHDFS(TestImport): + @pytest.fixture + def stage_md5(self): + return "ec0943f83357f702033c98e70b853c8c" -@pytest.fixture -def dir_md5(): - return "e6dcd267966dc628d732874f94ef4280.dir" + @pytest.fixture + def dir_md5(self): + return "e6dcd267966dc628d732874f94ef4280.dir" + @pytest.fixture + def is_object_storage(self): + return False -@pytest.fixture -def hash_name(): - return "checksum" +class TestAddHDFS(TestAdd): + @pytest.fixture + def hash_name(self): + return "checksum" -@pytest.fixture -def hash_value(): - return "000002000000000000000000a86fe4d846edc1bf4c355cb6112f141e" + @pytest.fixture + def hash_value(self): + return "000002000000000000000000a86fe4d846edc1bf4c355cb6112f141e" - -@pytest.fixture -def dir_hash_value(dir_md5): - pytest.skip("external outputs are broken for hdfs dirs") + @pytest.fixture + def dir_hash_value(self): + pytest.skip("external outputs are broken for hdfs dirs") From 1e13c13e95d38f24535a2a9db18c6d0e42559cbf Mon Sep 17 00:00:00 2001 From: David de la Iglesia Castro Date: Wed, 4 May 2022 20:12:54 +0200 Subject: [PATCH 2/2] test_dvc: Skip test_import_dir --- dvc_hdfs/tests/test_dvc.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dvc_hdfs/tests/test_dvc.py b/dvc_hdfs/tests/test_dvc.py index 1db1b22..3c3a7ff 100644 --- a/dvc_hdfs/tests/test_dvc.py +++ b/dvc_hdfs/tests/test_dvc.py @@ -31,7 +31,7 @@ def stage_md5(self): @pytest.fixture def dir_md5(self): - return "e6dcd267966dc628d732874f94ef4280.dir" + pytest.skip("https://github.com/iterative/dvc-hdfs/issues/2") @pytest.fixture def is_object_storage(self):