File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 5151 'plasma' ,
5252 's3' ,
5353 'tensorflow' ,
54- 'flight'
54+ 'flight' ,
55+ 'slow' ,
56+ 'requires_testing_data' ,
5557]
5658
5759
7072 's3' : False ,
7173 'tensorflow' : False ,
7274 'flight' : False ,
75+ 'slow' : False ,
76+ 'requires_testing_data' : True ,
7377}
7478
7579try :
@@ -166,18 +170,6 @@ def bool_env(name, default=None):
166170 action = 'store_true' , default = default ,
167171 help = ('Run only the {} test group' .format (group )))
168172
169- parser .addoption ('--runslow' , action = 'store_true' ,
170- default = False , help = 'run slow tests' )
171-
172-
173- def pytest_collection_modifyitems (config , items ):
174- if not config .getoption ('--runslow' ):
175- skip_slow = pytest .mark .skip (reason = 'need --runslow option to run' )
176-
177- for item in items :
178- if 'slow' in item .keywords :
179- item .add_marker (skip_slow )
180-
181173
182174def pytest_runtest_setup (item ):
183175 only_set = False
Original file line number Diff line number Diff line change @@ -152,25 +152,25 @@ def test_to_pandas_zero_copy():
152152 arr = pa .array (range (10 ))
153153
154154 for i in range (10 ):
155- np_arr = arr .to_pandas ()
156- assert sys .getrefcount (np_arr ) == 2
157- np_arr = None # noqa
155+ series = arr .to_pandas ()
156+ assert sys .getrefcount (series ) == 2
157+ series = None # noqa
158158
159159 assert sys .getrefcount (arr ) == 2
160160
161161 for i in range (10 ):
162162 arr = pa .array (range (10 ))
163- np_arr = arr .to_pandas ()
163+ series = arr .to_pandas ()
164164 arr = None
165165 gc .collect ()
166166
167167 # Ensure base is still valid
168168
169169 # Because of py.test's assert inspection magic, if you put getrefcount
170170 # on the line being examined, it will be 1 higher than you expect
171- base_refcount = sys .getrefcount (np_arr .base )
171+ base_refcount = sys .getrefcount (series . values .base )
172172 assert base_refcount == 2
173- np_arr .sum ()
173+ series .sum ()
174174
175175
176176@pytest .mark .nopandas
Original file line number Diff line number Diff line change @@ -1191,7 +1191,7 @@ def test_compressed_recordbatch_stream(compression):
11911191 else :
11921192 raise
11931193 writer = pa .RecordBatchStreamWriter (stream , table .schema )
1194- writer .write_table (table , chunksize = 3 )
1194+ writer .write_table (table , max_chunksize = 3 )
11951195 writer .close ()
11961196 stream .close () # Flush data
11971197 buf = raw .getvalue ()
Original file line number Diff line number Diff line change @@ -2352,9 +2352,7 @@ def test_noncoerced_nanoseconds_written_without_exception(tempdir):
23522352 # nanosecond timestamps by default
23532353 n = 9
23542354 df = pd .DataFrame ({'x' : range (n )},
2355- index = pd .DatetimeIndex (start = '2017-01-01' ,
2356- freq = '1n' ,
2357- periods = n ))
2355+ index = pd .date_range ('2017-01-01' , freq = '1n' , periods = n ))
23582356 tb = pa .Table .from_pandas (df )
23592357
23602358 filename = tempdir / 'written.parquet'
@@ -3025,7 +3023,7 @@ def test_write_nested_zero_length_array_chunk_failure():
30253023 # Each column is a ChunkedArray with 2 elements
30263024 my_arrays = [pa .array (batch , type = pa .struct (cols )).flatten ()
30273025 for batch in data ]
3028- my_batches = [pa .RecordBatch .from_arrays (batch , pa .schema (cols ))
3026+ my_batches = [pa .RecordBatch .from_arrays (batch , schema = pa .schema (cols ))
30293027 for batch in my_arrays ]
30303028 tbl = pa .Table .from_batches (my_batches , pa .schema (cols ))
30313029 _check_roundtrip (tbl )
Original file line number Diff line number Diff line change @@ -520,6 +520,8 @@ def deserializer(data):
520520 assert np .alltrue (new_x .view (np .ndarray ) == np .zeros (3 ))
521521
522522
523+ @pytest .mark .filterwarnings (
524+ "ignore:the matrix subclass:PendingDeprecationWarning" )
523525def test_numpy_matrix_serialization (tmpdir ):
524526 class CustomType (object ):
525527 def __init__ (self , val ):
You can’t perform that action at this time.
0 commit comments