Skip to content

Commit

Permalink
chore: resolve deprecation warnings from sys tests (#705)
Browse files Browse the repository at this point in the history
  • Loading branch information
plamut committed Jun 18, 2021
1 parent b2a689b commit 9cdeee0
Showing 1 changed file with 5 additions and 9 deletions.
14 changes: 5 additions & 9 deletions tests/system/test_client.py
Expand Up @@ -1123,7 +1123,7 @@ def test_extract_table(self):
job.result(timeout=100)

self.to_delete.insert(0, destination)
got_bytes = retry_storage_errors(destination.download_as_string)()
got_bytes = retry_storage_errors(destination.download_as_bytes)()
got = got_bytes.decode("utf-8")
self.assertIn("Bharney Rhubble", got)

Expand Down Expand Up @@ -2178,15 +2178,11 @@ def test_nested_table_to_arrow(self):
self.assertEqual(tbl.num_rows, 1)
self.assertEqual(tbl.num_columns, 3)
# Columns may not appear in the requested order.
self.assertTrue(
pyarrow.types.is_float64(tbl.schema.field_by_name("float_col").type)
)
self.assertTrue(
pyarrow.types.is_string(tbl.schema.field_by_name("string_col").type)
)
record_col = tbl.schema.field_by_name("record_col").type
self.assertTrue(pyarrow.types.is_float64(tbl.schema.field("float_col").type))
self.assertTrue(pyarrow.types.is_string(tbl.schema.field("string_col").type))
record_col = tbl.schema.field("record_col").type
self.assertTrue(pyarrow.types.is_struct(record_col))
self.assertEqual(record_col.num_children, 2)
self.assertEqual(record_col.num_fields, 2)
self.assertEqual(record_col[0].name, "nested_string")
self.assertTrue(pyarrow.types.is_string(record_col[0].type))
self.assertEqual(record_col[1].name, "nested_repeated")
Expand Down

0 comments on commit 9cdeee0

Please sign in to comment.