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))
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))