def test_cat_gz(self): self.add_mock_s3_data( {'walrus': {'data/foo.gz': gzip_compress(b'foo\n' * 10000)}}) self.assertEqual( b''.join(self.fs._cat_file('s3://walrus/data/foo.gz')), b'foo\n' * 10000)
def test_cat_gz(self): self.put_gcs_multi( {'gs://walrus/data/foo.gz': gzip_compress(b'foo\n' * 10000)}) self.assertEqual( b''.join(self.fs._cat_file('gs://walrus/data/foo.gz')), b'foo\n' * 10000)
def test_cat_gz(self): self.make_mock_file('data/foo.gz', gzip_compress(b'foo\n' * 10000)) remote_path = self.fs.join('hdfs:///data', 'foo.gz') self.assertEqual(b''.join(self.fs._cat_file(remote_path)), b'foo\n' * 10000)
def test_cat_gz(self): self.make_master_file(os.path.join('data', 'foo.gz'), gzip_compress('foo\n' * 10000)) remote_path = self.fs.path_join('ssh://testmaster/data', 'foo.gz') self.assertEqual(list(self.fs._cat_file(remote_path)), ['foo\n'] * 10000)
def test_cat_gz(self): self.make_mock_file('data/foo.gz', gzip_compress(b'foo\n' * 10000)) remote_path = self.fs.join('hdfs:///data', 'foo.gz') self.assertEqual(list(self.fs._cat_file(remote_path)), [b'foo\n'] * 10000)
def test_cat_gz(self): self.make_master_file(os.path.join('data', 'foo.gz'), gzip_compress(b'foo\n' * 10000)) remote_path = self.fs.path_join('ssh://testmaster/data', 'foo.gz') self.assertEqual(list(self.fs._cat_file(remote_path)), [b'foo\n'] * 10000)
def test_cat_gz(self): self.put_gcs_multi({ 'gs://walrus/data/foo.gz': gzip_compress(b'foo\n' * 10000) }) self.assertEqual(list(self.fs._cat_file('gs://walrus/data/foo.gz')), [b'foo\n'] * 10000)
def test_cat_gz(self): self.put_gcs_multi({"gs://walrus/data/foo.gz": gzip_compress(b"foo\n" * 10000)}) self.assertEqual(list(self.fs._cat_file("gs://walrus/data/foo.gz")), [b"foo\n"] * 10000)
def test_cat_gz(self): self.make_mock_file("data/foo.gz", gzip_compress("foo\n" * 10000)) remote_path = self.fs.path_join("hdfs:///data", "foo.gz") self.assertEqual(list(self.fs._cat_file(remote_path)), ["foo\n"] * 10000)
def test_cat_gz(self): remote_path = self.add_mock_s3_data("walrus", "data/foo.gz", gzip_compress(b"foo\n" * 10000)) self.assertEqual(list(self.fs._cat_file(remote_path)), [b"foo\n"] * 10000)
def test_cat_gz(self): remote_path = self.add_mock_s3_data('walrus', 'data/foo.gz', gzip_compress('foo\n' * 10000)) self.assertEqual(list(self.fs._cat_file(remote_path)), ['foo\n'] * 10000)
def test_cat_gz(self): remote_path = self.add_mock_s3_data( 'walrus', 'data/foo.gz', gzip_compress('foo\n' * 10000)) self.assertEqual(list(self.fs._cat_file(remote_path)), ['foo\n'] * 10000)