Esempio n. 1
0
 def test_not_parquet_file(self):
     """Test reading a non-parquet file."""
     with tempfile.NamedTemporaryFile() as t:
         t.write(b"blah")
         t.flush()
         self.assertFalse(parquet._check_header_magic_bytes(t))
         self.assertFalse(parquet._check_footer_magic_bytes(t))
Esempio n. 2
0
 def test_not_parquet_file(self):
     """Test reading a non-parquet file."""
     with tempfile.NamedTemporaryFile() as t:
         t.write(b"blah")
         t.flush()
         self.assertFalse(parquet._check_header_magic_bytes(t))
         self.assertFalse(parquet._check_footer_magic_bytes(t))
Esempio n. 3
0
 def test_footer_magic_bytes(self):
     with tempfile.NamedTemporaryFile() as t:
         t.write("PAR1_some_bogus_data_PAR1")
         t.flush()
         self.assertTrue(parquet._check_footer_magic_bytes(t))
Esempio n. 4
0
 def test_footer_magic_bytes(self):
     with tempfile.NamedTemporaryFile() as t:
         t.write("PAR1_some_bogus_data_PAR1")
         t.flush()
         self.assertTrue(parquet._check_footer_magic_bytes(t))