예제 #1
0
def test_record_size(path):
    sample = array_maker.sample_reader(path)
    sample_bacthes = array_maker.bake_batch(path)
    records = list(itertools.chain(*sample_bacthes))
    record_size = [array_maker.process.get_size(r) for r in records]
    wrong_record_size = len([rz for rz in record_size if rz > 1])
    assert wrong_record_size==0
def test_bacth_size(path):
    sample = array_maker.sample_reader(path)
    sample_bacthes = array_maker.bake_batch(path)
    batch_size = [array_maker.process.get_size(s) for s in sample_bacthes]
    wrong_batch_size = len([bz for bz in batch_size if bz > 5])
    assert wrong_batch_size == 0
def test_record_number_intactx(path):
    sample = array_maker.sample_reader(path)
    sample_bacthes = array_maker.bake_batch(path)
    records = list(itertools.chain(*sample_bacthes))
    filtered = array_maker.process.size_filter(sample)
    assert len(filtered) == len(records)
예제 #4
0
def test_record_order(path):
    sample = array_maker.sample_reader(path)
    sample_bacthes = array_maker.bake_batch(path)
    records = list(itertools.chain(*sample_bacthes))
    filtered = array_maker.process.size_filter(sample)
    assert filtered == records
def test_record_intact(path):
    sample = array_maker.sample_reader(path)
    sample_bacthes = array_maker.bake_batch(path)
    records = list(itertools.chain(*sample_bacthes))
    distorted_records = len([r for r in records if r not in sample])
    assert distorted_records == 0