@@ -47,7 +47,7 @@ def test_read_gbq_colab_to_pandas_batches_preserves_order_by(maybe_ordered_sessi
4747def test_read_gbq_colab_includes_formatted_scalars (session ):
4848 pyformat_args = {
4949 "some_integer" : 123 ,
50- "some_string" : "This could be dangerous, but we esape it" ,
50+ "some_string" : "This could be dangerous, but we escape it" ,
5151 # This is not a supported type, but ignored if not referenced.
5252 "some_object" : object (),
5353 }
@@ -66,39 +66,7 @@ def test_read_gbq_colab_includes_formatted_scalars(session):
6666 {
6767 "some_integer" : pandas .Series ([123 ], dtype = pandas .Int64Dtype ()),
6868 "some_string" : pandas .Series (
69- ["This could be dangerous, but we esape it" ],
70- dtype = "string[pyarrow]" ,
71- ),
72- "escaped" : pandas .Series (["{escaped}" ], dtype = "string[pyarrow]" ),
73- }
74- ),
75- )
76-
77-
78- def test_read_gbq_colab_includes_formatted_bigframes_dataframe (session ):
79- pyformat_args = {
80- # TODO: put a bigframes DataFrame here.
81- "some_integer" : 123 ,
82- "some_string" : "This could be dangerous, but we esape it" ,
83- # This is not a supported type, but ignored if not referenced.
84- "some_object" : object (),
85- }
86- df = session ._read_gbq_colab (
87- """
88- SELECT {some_integer} as some_integer,
89- {some_string} as some_string,
90- '{{escaped}}' as escaped
91- """ ,
92- pyformat_args = pyformat_args ,
93- )
94- result = df .to_pandas ()
95- pandas .testing .assert_frame_equal (
96- result ,
97- pandas .DataFrame (
98- {
99- "some_integer" : pandas .Series ([123 ], dtype = pandas .Int64Dtype ()),
100- "some_string" : pandas .Series (
101- ["This could be dangerous, but we esape it" ],
69+ ["This could be dangerous, but we escape it" ],
10270 dtype = "string[pyarrow]" ,
10371 ),
10472 "escaped" : pandas .Series (["{escaped}" ], dtype = "string[pyarrow]" ),
0 commit comments