From ea8a13b5af3aafb38f716776eda36fa75a78c72e Mon Sep 17 00:00:00 2001 From: Jaisen Mathai Date: Fri, 24 Jun 2016 00:53:27 -0400 Subject: [PATCH] gh-61 gh-108 Enable audio/video EXIF writing tests on Travis --- elodie/tests/elodie_test.py | 16 ---------------- elodie/tests/filesystem_test.py | 7 ------- elodie/tests/media/audio_test.py | 19 ------------------- elodie/tests/media/video_test.py | 16 ---------------- 4 files changed, 58 deletions(-) diff --git a/elodie/tests/elodie_test.py b/elodie/tests/elodie_test.py index 8c8fa1c..68bb94e 100644 --- a/elodie/tests/elodie_test.py +++ b/elodie/tests/elodie_test.py @@ -87,9 +87,6 @@ def test_import_file_video(): assert helper.path_tz_fix(os.path.join('2015-01-Jan','California','2015-01-19_12-45-11-video.mov')) in dest_path, dest_path def test_update_location_on_audio(): - if not can_edit_exif(): - raise SkipTest('avmetareadwrite executable not found') - temporary_folder, folder = helper.create_working_folder() temporary_folder_destination, folder_destination = helper.create_working_folder() @@ -165,9 +162,6 @@ def test_update_location_on_text(): assert helper.isclose(metadata_processed['longitude'], -122.03635), metadata_processed['longitude'] def test_update_location_on_video(): - if not can_edit_exif(): - raise SkipTest('avmetareadwrite executable not found') - temporary_folder, folder = helper.create_working_folder() temporary_folder_destination, folder_destination = helper.create_working_folder() @@ -193,9 +187,6 @@ def test_update_location_on_video(): assert helper.isclose(metadata_processed['longitude'], -122.03635), metadata_processed['longitude'] def test_update_time_on_audio(): - if not can_edit_exif(): - raise SkipTest('avmetareadwrite executable not found') - temporary_folder, folder = helper.create_working_folder() temporary_folder_destination, folder_destination = helper.create_working_folder() @@ -268,9 +259,6 @@ def test_update_time_on_text(): assert metadata_processed['date_taken'] == helper.time_convert((2000, 1, 1, 12, 0, 0, 5, 1, 0)), metadata_processed['date_taken'] def test_update_time_on_video(): - if not can_edit_exif(): - raise SkipTest('avmetareadwrite executable not found') - temporary_folder, folder = helper.create_working_folder() temporary_folder_destination, folder_destination = helper.create_working_folder() @@ -303,7 +291,3 @@ def restore_hash_db(): hash_db = '{}-test'.format(constants.hash_db) if os.path.isfile(hash_db): os.rename(hash_db, hash_db.replace('-test', '')) - -def can_edit_exif(): - video = Video() - return video.get_avmetareadwrite() diff --git a/elodie/tests/filesystem_test.py b/elodie/tests/filesystem_test.py index a821d0b..dd6a8d4 100644 --- a/elodie/tests/filesystem_test.py +++ b/elodie/tests/filesystem_test.py @@ -342,9 +342,6 @@ def test_process_file_with_album_and_title_and_location(): # gh-89 (setting album then title reverts album) def test_process_video_with_album_then_title(): - if not can_edit_exif(): - raise SkipTest('avmetareadwrite executable not found') - filesystem = FileSystem() temporary_folder, folder = helper.create_working_folder() @@ -366,7 +363,3 @@ def test_process_video_with_album_then_title(): assert origin_checksum is not None, origin_checksum assert origin_checksum != destination_checksum, destination_checksum assert helper.path_tz_fix(os.path.join('2015-01-Jan','test_album','2015-01-19_12-45-11-movie-test_title.mov')) in destination, destination - -def can_edit_exif(): - video = Video() - return video.get_avmetareadwrite() diff --git a/elodie/tests/media/audio_test.py b/elodie/tests/media/audio_test.py index 9f4aedc..3618525 100644 --- a/elodie/tests/media/audio_test.py +++ b/elodie/tests/media/audio_test.py @@ -77,9 +77,6 @@ def test_is_not_valid(): assert not audio.is_valid() def test_set_date_taken(): - if not can_edit_exif(): - raise SkipTest('avmetareadwrite executable not found') - temporary_folder, folder = helper.create_working_folder() origin = '%s/audio.m4a' % folder @@ -100,9 +97,6 @@ def test_set_date_taken(): assert date_taken == (2013, 9, 30, 7, 6, 5, 0, 273, 0), metadata['date_taken'] def test_set_location(): - if not can_edit_exif(): - raise SkipTest('avmetareadwrite executable not found') - temporary_folder, folder = helper.create_working_folder() origin = '%s/audio.m4a' % folder @@ -129,9 +123,6 @@ def test_set_location(): assert helper.isclose(metadata['longitude'], 99.9999999999), metadata['longitude'] def test_set_location_minus(): - if not can_edit_exif(): - raise SkipTest('avmetareadwrite executable not found') - temporary_folder, folder = helper.create_working_folder() origin = '%s/audio.m4a' % folder @@ -158,9 +149,6 @@ def test_set_location_minus(): assert helper.isclose(metadata['longitude'], -99.999999), metadata['longitude'] def test_set_title(): - if not can_edit_exif(): - raise SkipTest('avmetareadwrite executable not found') - temporary_folder, folder = helper.create_working_folder() origin = '%s/audio.m4a' % folder @@ -181,9 +169,6 @@ def test_set_title(): assert metadata['title'] == 'my audio title', metadata['title'] def test_set_title_non_ascii(): - if not can_edit_exif(): - raise SkipTest('avmetareadwrite executable not found') - raise SkipTest('gh-27, non-ascii characters') temporary_folder, folder = helper.create_working_folder() @@ -203,7 +188,3 @@ def test_set_title_non_ascii(): shutil.rmtree(folder) assert metadata['title'] == '形声字 / 形聲字', metadata['title'] - -def can_edit_exif(): - audio = Audio() - return audio.get_avmetareadwrite() diff --git a/elodie/tests/media/video_test.py b/elodie/tests/media/video_test.py index 96c709f..91ea516 100644 --- a/elodie/tests/media/video_test.py +++ b/elodie/tests/media/video_test.py @@ -101,9 +101,6 @@ def test_set_album(): assert metadata_new['album'] == 'Test Album', metadata_new['album'] def test_set_date_taken(): - if not can_edit_exif(): - raise SkipTest('avmetareadwrite executable not found') - temporary_folder, folder = helper.create_working_folder() origin = '%s/video.mov' % folder @@ -124,9 +121,6 @@ def test_set_date_taken(): assert date_taken == (2013, 9, 30, 7, 6, 5, 0, 273, 0), metadata['date_taken'] def test_set_location(): - if not can_edit_exif(): - raise SkipTest('avmetareadwrite executable not found') - temporary_folder, folder = helper.create_working_folder() origin = '%s/video.mov' % folder @@ -153,9 +147,6 @@ def test_set_location(): assert helper.isclose(metadata['longitude'], 99.9999999999), metadata['longitude'] def test_set_title(): - if not can_edit_exif(): - raise SkipTest('avmetareadwrite executable not found') - temporary_folder, folder = helper.create_working_folder() origin = '%s/video.mov' % folder @@ -176,9 +167,6 @@ def test_set_title(): assert metadata['title'] == 'my video title', metadata['title'] def test_set_title_non_ascii(): - if not can_edit_exif(): - raise SkipTest('avmetareadwrite executable not found') - raise SkipTest('gh-27, non-ascii characters') temporary_folder, folder = helper.create_working_folder() @@ -198,7 +186,3 @@ def test_set_title_non_ascii(): shutil.rmtree(folder) assert metadata['title'] == '形声字 / 形聲字', metadata['title'] - -def can_edit_exif(): - video = Video() - return video.get_avmetareadwrite()