fixing after merge

This commit is contained in:
aliabd 2021-11-03 18:30:58 -07:00
parent 7ce37829e0
commit 0a2f05d7f3

View File

@ -346,9 +346,9 @@ class TestAudio(unittest.TestCase):
self.assertEqual(output[1].shape, (8046,))
self.assertEqual(audio_input.preprocess_example("test/test_files/audio_sample.wav"), x_wav["data"])
self.assertEqual(audio_input.serialize("test/test_files/audio_sample.wav", True)["data"], x_wav["data"])
to_save = audio_input.save_flagged("flagged", "audio_input", x_wav["data"], None)
to_save = audio_input.save_flagged("flagged", "audio_input", x_wav, None)
self.assertEqual("audio_input/0.wav", to_save)
to_save = audio_input.save_flagged("flagged", "audio_input", x_wav["data"], None)
to_save = audio_input.save_flagged("flagged", "audio_input", x_wav, None)
self.assertEqual("audio_input/1.wav", to_save)
restored = audio_input.restore_flagged(to_save)
self.assertEqual(restored, "audio_input/1.wav")
@ -406,9 +406,9 @@ class TestFile(unittest.TestCase):
self.assertIsInstance(output, tempfile._TemporaryFileWrapper)
self.assertEqual(file_input.preprocess_example(x_file), x_file)
self.assertEqual(file_input.serialize("test/test_files/sample_file.pdf", True), 'test/test_files/sample_file.pdf')
to_save = file_input.save_flagged("flagged", "file_input", x_file, None)
to_save = file_input.save_flagged("flagged", "file_input", [x_file], None)
self.assertEqual("file_input/0.pdf", to_save)
to_save = file_input.save_flagged("flagged", "file_input", x_file, None)
to_save = file_input.save_flagged("flagged", "file_input", [x_file], None)
self.assertEqual("file_input/1.pdf", to_save)
restored = file_input.restore_flagged(to_save)
self.assertEqual(restored, "file_input/1.pdf")
@ -486,9 +486,9 @@ class TestVideo(unittest.TestCase):
output = video_input.preprocess(x_video)
self.assertIsInstance(output, str)
self.assertEqual(video_input.preprocess_example("test/test_files/video_sample.mp4"), x_video["data"])
to_save = video_input.save_flagged("flagged", "video_input", x_video["data"], None)
to_save = video_input.save_flagged("flagged", "video_input", x_video, None)
self.assertEqual("video_input/0.mp4", to_save)
to_save = video_input.save_flagged("flagged", "video_input", x_video["data"], None)
to_save = video_input.save_flagged("flagged", "video_input", x_video, None)
self.assertEqual("video_input/1.mp4", to_save)
restored = video_input.restore_flagged(to_save)
self.assertEqual(restored, "video_input/1.mp4")