Skip to content

nbrun needs to handle exceptions that are meant to happen #15

@rgommers

Description

@rgommers

Failure when running tests/nbrun.py locally:

eventsDS = xnd.xnd(data, type="20 * {id: int64, device: string}")
------------------

---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
<ipython-input-3-1f72a7c7018c> in <module>
----> 1 eventsDS = xnd.xnd(data, type="20 * {id: int64, device: string}")

~/anaconda3/envs/xnd/lib/python3.7/site-packages/xnd/__init__.py in __new__(cls, value, type, dtype, levels, typedef, dtypedef, device)
    131             device = (name, no)
    132 
--> 133         return super().__new__(cls, type=type, value=value, device=device)
    134 
    135     def __repr__(self):

TypeError: xnd: expected dict, not 'tuple'
TypeError: xnd: expected dict, not 'tuple'

That TypeError is part of the story of the notebook, it's demonstrating an expected error. So nbrun should be updated to handle it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions