예제 #1
0
    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)
예제 #2
0
파일: test_gcs.py 프로젝트: suzil/mrjob
    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)
예제 #3
0
    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)
예제 #4
0
    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)
예제 #5
0
    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)
예제 #6
0
    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)
예제 #7
0
    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)
예제 #8
0
    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)
예제 #9
0
    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)
예제 #10
0
    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)
예제 #11
0
파일: test_s3.py 프로젝트: tempcyc/mrjob
    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)
예제 #12
0
    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)
예제 #13
0
파일: test_s3.py 프로젝트: Python-Z/mrjob
    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)