99import pathlib
1010import numpy as np
1111import decimal
12- import pyarrow as pa
1312
1413import patch_path
1514PROJ_ROOT = patch_path .PROJ_ROOT
2423 import pyarrow
2524except ImportError :
2625 pd = None
26+ pyarrow = None
2727
2828
2929import questdb .ingress as qi
@@ -219,7 +219,7 @@ def test_http(self):
219219
220220 resp = self .qdb_plain .retry_check_table (table_name , min_rows = 3 )
221221
222- exp_ts_type = 'TIMESTAMP' if self .qdb_plain .version <= (9 , 1 , 0 ) else 'TIMESTAMP_NS'
222+ exp_ts_type = 'TIMESTAMP' if self .qdb_plain .version < (9 , 1 , 0 ) else 'TIMESTAMP_NS'
223223
224224 exp_columns = [
225225 {'name' : 'name_a' , 'type' : 'SYMBOL' },
@@ -291,7 +291,7 @@ def test_decimal_py_obj(self):
291291 scrubbed_data = [row [:- 1 ] for row in resp ['dataset' ]]
292292 self .assertEqual (scrubbed_data , expected_data )
293293
294- @unittest .skipIf (not pa , 'pyarrow not installed' )
294+ @unittest .skipIf (not pyarrow , 'pyarrow not installed' )
295295 @unittest .skipIf (not pd , 'pandas not installed' )
296296 def test_decimal_pyarrow (self ):
297297 if self .qdb_plain .version < FIRST_DECIMAL_RELEASE :
@@ -303,7 +303,7 @@ def test_decimal_pyarrow(self):
303303 decimal .Decimal ('-678' ),
304304 None
305305 ],
306- dtype = pd .ArrowDtype (pa .decimal128 (18 , 2 ))
306+ dtype = pd .ArrowDtype (pyarrow .decimal128 (18 , 2 ))
307307 )
308308 })
309309
0 commit comments