def test_view_retains_ndarray_subclass():
    adata = ad.AnnData(np.zeros((10, 10)))
    adata.obsm["foo"] = np.zeros((10, 5)).view(NDArraySubclass)

    view = adata[:5, :]

    assert isinstance(view.obsm["foo"], NDArraySubclass)
    assert view.obsm["foo"].shape == (5, 5)
def setUp(self):
        super(ExplorationVoiceoverApplicationUnitTest, self).setUp()
        self.signup('author@example.com', 'author')
        self.author_id = self.get_user_id_from_email('author@example.com')

        self.signup('reviewer@example.com', 'reviewer')
        self.reviewer_id = self.get_user_id_from_email('reviewer@example.com')

        self.voiceover_application = (
            suggestion_registry.ExplorationVoiceoverApplication(
                'application_id', 'exp_id', suggestion_models.STATUS_IN_REVIEW,
                self.author_id, None, 'en', 'audio_file.mp3', '<p>Content</p>',
                None))