def test_negative_scalar_index(adata, index: int, obs: bool):
    pos_index = index + (adata.n_obs if obs else adata.n_vars)

    if obs:
        adata_pos_subset = adata[pos_index]
        adata_neg_subset = adata[index]
    else:
        adata_pos_subset = adata[:, pos_index]
        adata_neg_subset = adata[:, index]

    np.testing.assert_array_equal(
        adata_pos_subset.obs_names, adata_neg_subset.obs_names
    )
    np.testing.assert_array_equal(
        adata_pos_subset.var_names, adata_neg_subset.var_names
    )
def test_validation_for_rejected_application_with_no_message(self):
        self.assertEqual(
            self.voiceover_application.status,
            suggestion_models.STATUS_IN_REVIEW)
        self.assertEqual(self.voiceover_application.rejection_message, None)
        self.voiceover_application.validate()

        self.voiceover_application.final_reviewer_id = 'reviewer_id'
        self.voiceover_application.status = suggestion_models.STATUS_REJECTED
        with self.assertRaisesRegex(
            utils.ValidationError,
            'Expected rejection_message to be a string for a '
            'rejected application'
        ):
            self.voiceover_application.validate()