File tree Expand file tree Collapse file tree 2 files changed +3
-6
lines changed Expand file tree Collapse file tree 2 files changed +3
-6
lines changed Original file line number Diff line number Diff line change @@ -1097,9 +1097,7 @@ def to_gbq(
10971097    # fail early if there are bigframes-y methods available. 
10981098    # https://github.com/googleapis/python-bigquery-pandas/issues/824 
10991099    if  hasattr (dataframe , "to_pandas" ) and  hasattr (dataframe , "to_gbq" ):
1100-         raise  TypeError (
1101-             f"Expected a pandas.DataFrame, but got { repr (type (dataframe ))}  
1102-         )
1100+         raise  TypeError (f"Expected a pandas.DataFrame, but got { repr (type (dataframe ))}  )
11031101
11041102    _test_google_api_imports ()
11051103
Original file line number Diff line number Diff line change @@ -16,7 +16,7 @@ class FakeDataFrame:
1616
1717    def  to_gbq (self ):
1818        """Fake to_gbq() to mimic a bigframes object.""" 
19-      
19+ 
2020    def  to_pandas (self ):
2121        """Fake to_pandas() to mimic a bigframes object.""" 
2222
@@ -80,8 +80,7 @@ def test_to_gbq_with_bigframes_raises_typeerror():
8080    dataframe  =  FakeDataFrame ()
8181
8282    with  pytest .raises (
83-         TypeError ,
84-         match = r"Expected a pandas.DataFrame, but got .+FakeDataFrame" 
83+         TypeError , match = r"Expected a pandas.DataFrame, but got .+FakeDataFrame" 
8584    ):
8685        gbq .to_gbq (dataframe , "my_dataset.my_table" , project_id = "myproj" )
8786
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments