def test_make_tfrecord_options_with_bad_inputs(self, filenames): with self.assertRaisesRegexp( ValueError, 'Incorrect value: {}. Filenames need to be all of the same type: ' 'either all with .gz or all without .gz'.format( ','.join(filenames))): io.make_tfrecord_options(filenames)
def test_make_tfrecord_options(self, filenames, expected_compression_type): compression_type = python_io.TFRecordOptions.get_compression_type_string( io.make_tfrecord_options(filenames)) self.assertEqual(compression_type, expected_compression_type)