def test_copy(self): arr = self.na_data exp_sparr = SparseArray(arr) splist = SparseList() splist.append(arr[:5]) splist.append(arr[5]) cp = splist.copy() cp.append(arr[6:]) self.assertEquals(splist.nchunks, 2) assert_sp_array_equal(cp.to_array(), exp_sparr)
def test_copy(self): with tm.assert_produces_warning(FutureWarning, check_stacklevel=False): arr = self.na_data exp_sparr = SparseArray(arr) splist = SparseList() splist.append(arr[:5]) splist.append(arr[5]) cp = splist.copy() cp.append(arr[6:]) self.assertEqual(splist.nchunks, 2) tm.assert_sp_array_equal(cp.to_array(), exp_sparr)