def test_readed_with_cascade_is_compliant(self):
        '''
        Reading %s files in `files_to_test` with `cascade` is compliant.

        A reader with cascade = False should return empty children.
        ''' % self.ioclass.__name__
        # This is for files presents at G-Node or generated
        for obj, path in self.iter_objects(cascade=False, lazy=False,
                                           return_path=True):
            try:
                # Check compliance of the block or segment
                assert_neo_object_is_compliant(obj)
                assert_children_empty(obj, self.ioclass)
            # intercept exceptions and add more information
            except BaseException as exc:
                exc.args += ('from %s ' % os.path.basename(path),)
                raise
Exemple #2
0
    def test_readed_with_cascade_is_compliant(self):
        '''
        Reading %s files in `files_to_test` with `cascade` is compliant.

        A reader with cascade = False should return empty children.
        ''' % self.ioclass.__name__
        # This is for files presents at G-Node or generated
        for obj, path in self.iter_objects(cascade=False,
                                           lazy=False,
                                           return_path=True):
            try:
                # Check compliance of the block or segment
                assert_neo_object_is_compliant(obj)
                assert_children_empty(obj, self.ioclass)
            # intercept exceptions and add more information
            except BaseException as exc:
                exc.args += ('from %s ' % os.path.basename(path), )
                raise