def test_deepcopy_subset(adata, spmat: type):
    adata.obsp["arr"] = np.zeros((adata.n_obs, adata.n_obs))
    adata.obsp["spmat"] = spmat((adata.n_obs, adata.n_obs))

    adata = deepcopy(adata[:10].copy())

    assert isinstance(adata.obsp["arr"], np.ndarray)
    assert not isinstance(adata.obsp["arr"], ArrayView)
    np.testing.assert_array_equal(adata.obsp["arr"].shape, (10, 10))

    assert isinstance(adata.obsp["spmat"], spmat)
    assert not isinstance(
        adata.obsp["spmat"],
        SparseCSRView if spmat is sparse.csr_matrix else SparseCSCView,
    )
    np.testing.assert_array_equal(adata.obsp["spmat"].shape, (10, 10))
def reset(cls):
        cls.info = [
            [
                "Keyboard Control:",
                "  auto repeat:  on    key click percent:  0    LED mask:  00000002",
                "  XKB indicators:",
                "    00: Caps Lock:   off    01: Num Lock:    on     02: Scroll Lock: off",
                "    03: Compose:     off    04: Kana:        off    05: Sleep:       off",
            ],
            [
                "Keyboard Control:",
                "  auto repeat:  on    key click percent:  0    LED mask:  00000002",
                "  XKB indicators:",
                "    00: Caps Lock:   on     01: Num Lock:    on     02: Scroll Lock: off",
                "    03: Compose:     off    04: Kana:        off    05: Sleep:       off",
            ],
        ]
        cls.index = 0
        cls.is_error = False