File tree Expand file tree Collapse file tree 2 files changed +15
-1
lines changed Expand file tree Collapse file tree 2 files changed +15
-1
lines changed Original file line number Diff line number Diff line change @@ -386,6 +386,20 @@ def test_add_row_round_trip(self):
386
386
t2 .add_row (** attr .asdict (row ))
387
387
assert t1 == t2
388
388
389
+ def test_append_row (self ):
390
+ for num_rows in [0 , 10 , 100 ]:
391
+ table = self .table_class ()
392
+ for j , row in enumerate (self .make_transposed_input_data (num_rows )):
393
+ k = table .append (table .row_class (** row ))
394
+ assert k == j
395
+ for colname , input_array in self .make_input_data (num_rows ).items ():
396
+ output_array = getattr (table , colname )
397
+ assert input_array .shape == output_array .shape
398
+ assert np .all (input_array == output_array )
399
+ table .clear ()
400
+ assert table .num_rows == 0
401
+ assert len (table ) == 0
402
+
389
403
def test_set_columns_data (self ):
390
404
for num_rows in [0 , 10 , 100 , 1000 ]:
391
405
input_data = {col .name : col .get_input (num_rows ) for col in self .columns }
Original file line number Diff line number Diff line change @@ -286,7 +286,7 @@ def __getitem__(self, index):
286
286
return self .row_class (* row )
287
287
288
288
def append (self , row ):
289
- return self .ll_table . add_row (** row )
289
+ return self .add_row (** attr . asdict ( row ) )
290
290
291
291
def clear (self ):
292
292
"""
You can’t perform that action at this time.
0 commit comments