1818
1919def generate_params1 ():
2020 for db_version in ["1.2.803" , "1.2.791" ]:
21- for body_format in ["arrow" , "json" ]:
21+ for query_result_format in ["arrow" , "json" ]:
2222 v = tuple (map (int , db_version .split ("." )))
23- if body_format == "arrow" and v < (1 , 2 , 836 ):
23+ if query_result_format == "arrow" and v < (1 , 2 , 836 ):
2424 continue
25- yield nox .param (db_version , body_format )
25+ yield nox .param (db_version , query_result_format )
2626
2727
2828@nox .session
29- @nox .parametrize (["db_version" , "body_format " ], generate_params1 ())
30- def new_driver_with_old_servers (session , db_version , body_format ):
29+ @nox .parametrize (["db_version" , "query_result_format " ], generate_params1 ())
30+ def new_driver_with_old_servers (session , db_version , query_result_format ):
3131 query_version = f"v{ db_version } -nightly"
3232 session .install ("behave" )
3333 # cd bindings/python
@@ -42,27 +42,30 @@ def new_driver_with_old_servers(session, db_version, body_format):
4242 "DATABEND_QUERY_VERSION" : query_version ,
4343 "DATABEND_META_VERSION" : query_version ,
4444 "DB_VERSION" : db_version ,
45- "BODY_FORMAT " : body_format ,
45+ "QUERY_RESULT_FORMAT " : query_result_format ,
4646 }
4747 session .run ("make" , "test-bindings-python" , env = env )
4848 session .run ("make" , "down" )
4949
5050
5151def generate_params2 ():
5252 for driver_version in ["0.28.2" , "0.28.1" ]:
53- for body_format in ["arrow" , "json" ]:
53+ for query_result_format in ["arrow" , "json" ]:
5454 v = tuple (map (int , driver_version .split ("." )))
55- if body_format == "arrow" and v <= (0 , 30 , 3 ):
55+ if query_result_format == "arrow" and v <= (0 , 30 , 3 ):
5656 continue
57- yield nox .param (driver_version , body_format )
57+ yield nox .param (driver_version , query_result_format )
5858
5959
6060@nox .session
61- @nox .parametrize (["driver_version" , "body_format " ], generate_params2 ())
62- def new_test_with_old_drivers (session , driver_version , body_format ):
61+ @nox .parametrize (["driver_version" , "query_result_format " ], generate_params2 ())
62+ def new_test_with_old_drivers (session , driver_version , query_result_format ):
6363 session .install ("behave" )
6464 session .install (f"databend-driver=={ driver_version } " )
6565 with session .chdir (".." ):
66- env = {"DRIVER_VERSION" : driver_version , "BODY_FORMAT" : body_format }
66+ env = {
67+ "DRIVER_VERSION" : driver_version ,
68+ "QUERY_RESULT_FORMAT" : query_result_format ,
69+ }
6770 session .run ("make" , "test-bindings-python" , env = env )
6871 session .run ("make" , "down" )
0 commit comments