diff --git a/src/python/turicreate/test/test_sframe_s3.py b/src/python/turicreate/test/test_io_s3.py similarity index 91% rename from src/python/turicreate/test/test_sframe_s3.py rename to src/python/turicreate/test/test_io_s3.py index 2576036ef2..7d90ac7e00 100644 --- a/src/python/turicreate/test/test_sframe_s3.py +++ b/src/python/turicreate/test/test_io_s3.py @@ -8,6 +8,7 @@ from __future__ import division as _ # noqa from __future__ import absolute_import as _ # noqa from ..data_structures.sframe import SFrame +from ..data_structures.sarray import SArray from turicreate.util import _assert_sframe_equal import tempfile @@ -22,6 +23,7 @@ # 64MB is the cache block size. The big sframe with 77MB is used to # ensure there's no issues when crossing different cache blocks. remote_sframe_folders = ["small_sframe_dc", "medium_sframe_ac", "big_sframe_od"] +remote_sarray_folders = ["tiny_array"] @pytest.mark.skipif( @@ -40,6 +42,7 @@ def setup_class(self): self.bucket = "tc_qa" self.s3_root_prefix = "integration/manual/" self.s3_sframe_prefix = os.path.join(self.s3_root_prefix, "sframes/") + self.s3_sarray_prefix = os.path.join(self.s3_root_prefix, "sarrays/") # download all related files once self.downloaded_files = dict() @@ -105,6 +108,13 @@ def test_s3_sframe_download(self, folder): sf_from_s3 = SFrame(s3_url) _assert_sframe_equal(sf_from_disk, sf_from_s3) + @pytest.mark.parametrize("folder", remote_sarray_folders) + def test_s3_sarray_download(self, folder): + s3_url = os.path.join("s3://", self.bucket, self.s3_sarray_prefix, folder) + array = SArray(s3_url) + assert len(array) == 1 + assert array[0] == 1 + @pytest.mark.parametrize("folder", remote_sframe_folders) def test_s3_sframe_upload(self, folder): # s3 only writes when it receives all parts