diff --git a/src/core/storage/sframe_interface/unity_sframe.cpp b/src/core/storage/sframe_interface/unity_sframe.cpp index 88eac90ade..67474b84d8 100644 --- a/src/core/storage/sframe_interface/unity_sframe.cpp +++ b/src/core/storage/sframe_interface/unity_sframe.cpp @@ -1856,6 +1856,8 @@ void unity_sframe::delete_on_close() { } std::shared_ptr unity_sframe::get_planner_node() { + ASSERT_MSG(m_planner_node != nullptr, + "Unintialized SFrame planner node cannot be used for read"); return m_planner_node; } diff --git a/src/python/turicreate/test/test_io_s3.py b/src/python/turicreate/test/test_io_s3.py index 7d90ac7e00..9e76eccf27 100644 --- a/src/python/turicreate/test/test_io_s3.py +++ b/src/python/turicreate/test/test_io_s3.py @@ -129,6 +129,20 @@ def test_s3_sframe_upload(self, folder): # we can trust the upload becuase if the upload fails, # s3 will respond with 5xx + @pytest.mark.parametrize( + "url", + ["s3://gui/dummy", "./willy-nily/blah", "https://foo.com", "http://hao.com"], + ) + def test_s3_sframe_load_from_wrong_path(self, url): + # s3 only writes when it receives all parts + # it's sort of atmoic write on file level. + if six.PY2: + with pytest.raises(IOError): + SFrame(url) + else: + with pytest.raises(OSError): + SFrame(url) + def test_s3_sframe_upload_throw(self): # s3 only writes when it receives all parts # it's sort of atmoic write on file level.