def test_filter(self):
    raw_data = create_random_data(100)
    tfexamples = list(map(preprocessing.make_tf_example, *zip(*raw_data)))
    with tempfile.NamedTemporaryFile() as f:
        preprocessing.write_tf_examples(f.name, tfexamples)
        recovered_data = self.extract_data(f.name, filter_amount=0.05)
    self.assertLess(len(recovered_data), 50)
def test_filter(self):
    raw_data = create_random_data(100)
    tfexamples = list(map(preprocessing.make_tf_example, *zip(*raw_data)))
    with tempfile.NamedTemporaryFile() as f:
        preprocessing.write_tf_examples(f.name, tfexamples)
        recovered_data = self.extract_data(f.name, filter_amount=0.05)
    self.assertLess(len(recovered_data), 50)