jupyter / papyri

MIT License
82 stars 17 forks source link

Ensure tests run even if dask is not installed #370

Closed melissawm closed 6 months ago

melissawm commented 6 months ago

If dask is installed,

g.data["papyri"].to_dict()["arbitrary"][4]["children"][1]["children"][0]["dt"]["children"][0]=
{
    'type': 'Link', 
    'value': 'dask.delayed', 
    'reference': 
        {
            'type': 'RefInfo', 
            'module': 'dask', 
            'version': '*', 
            'kind': 'api', 
            'path': 'dask.delayed:delayed'
        }, 
    'kind': 'module', 
    'exists': True, 
    'anchor': None
}

if dask is not installed,

g.data["papyri"].to_dict()["arbitrary"][4]["children"][1]["children"][0]["dt"]["children"][0]=
{
    'type': 'Directive', 
    'value': 'dask.delayed', 
    'domain': None, 
    'role': None
}

We may also want to test the type here.