def test_spider_cycle(data_with_cycle): result = spider(str(data_with_cycle), followlinks=True) ss = """{ %r: { 'foo.csv': var * {a: int64, b: int64}, 'foo.hdf5': {fooh5: 10 * 2 * float64}, sub: {'foo.json': 2 * {a: int64, b: float64, c: ?datetime, d: ?string}} } }""" % os.path.basename(str(data_with_cycle)) assert dshape(discover(result)) != dshape(ss)
def test_spider(data): result = spider(str(data)) ss = """{ %r: { 'foo.csv': var * {a: int64, b: int64}, 'foo.hdf5': {fooh5: 10 * 2 * float64}, sub: {'foo.json': 2 * {a: int64, b: float64, c: ?datetime, d: ?string}} } }""" % os.path.basename(str(data)) assert dshape(discover(result)) == dshape(ss)