gh-61 gh-108 Enable audio/video EXIF writing tests on Travis
This commit is contained in:
parent
21b7c9fad1
commit
ea8a13b5af
|
@ -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
|
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():
|
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, folder = helper.create_working_folder()
|
||||||
temporary_folder_destination, folder_destination = 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']
|
assert helper.isclose(metadata_processed['longitude'], -122.03635), metadata_processed['longitude']
|
||||||
|
|
||||||
def test_update_location_on_video():
|
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, folder = helper.create_working_folder()
|
||||||
temporary_folder_destination, folder_destination = 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']
|
assert helper.isclose(metadata_processed['longitude'], -122.03635), metadata_processed['longitude']
|
||||||
|
|
||||||
def test_update_time_on_audio():
|
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, folder = helper.create_working_folder()
|
||||||
temporary_folder_destination, folder_destination = 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']
|
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():
|
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, folder = helper.create_working_folder()
|
||||||
temporary_folder_destination, folder_destination = 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)
|
hash_db = '{}-test'.format(constants.hash_db)
|
||||||
if os.path.isfile(hash_db):
|
if os.path.isfile(hash_db):
|
||||||
os.rename(hash_db, hash_db.replace('-test', ''))
|
os.rename(hash_db, hash_db.replace('-test', ''))
|
||||||
|
|
||||||
def can_edit_exif():
|
|
||||||
video = Video()
|
|
||||||
return video.get_avmetareadwrite()
|
|
||||||
|
|
|
@ -342,9 +342,6 @@ def test_process_file_with_album_and_title_and_location():
|
||||||
|
|
||||||
# gh-89 (setting album then title reverts album)
|
# gh-89 (setting album then title reverts album)
|
||||||
def test_process_video_with_album_then_title():
|
def test_process_video_with_album_then_title():
|
||||||
if not can_edit_exif():
|
|
||||||
raise SkipTest('avmetareadwrite executable not found')
|
|
||||||
|
|
||||||
filesystem = FileSystem()
|
filesystem = FileSystem()
|
||||||
temporary_folder, folder = helper.create_working_folder()
|
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 is not None, origin_checksum
|
||||||
assert origin_checksum != destination_checksum, destination_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
|
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()
|
|
||||||
|
|
|
@ -77,9 +77,6 @@ def test_is_not_valid():
|
||||||
assert not audio.is_valid()
|
assert not audio.is_valid()
|
||||||
|
|
||||||
def test_set_date_taken():
|
def test_set_date_taken():
|
||||||
if not can_edit_exif():
|
|
||||||
raise SkipTest('avmetareadwrite executable not found')
|
|
||||||
|
|
||||||
temporary_folder, folder = helper.create_working_folder()
|
temporary_folder, folder = helper.create_working_folder()
|
||||||
|
|
||||||
origin = '%s/audio.m4a' % 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']
|
assert date_taken == (2013, 9, 30, 7, 6, 5, 0, 273, 0), metadata['date_taken']
|
||||||
|
|
||||||
def test_set_location():
|
def test_set_location():
|
||||||
if not can_edit_exif():
|
|
||||||
raise SkipTest('avmetareadwrite executable not found')
|
|
||||||
|
|
||||||
temporary_folder, folder = helper.create_working_folder()
|
temporary_folder, folder = helper.create_working_folder()
|
||||||
|
|
||||||
origin = '%s/audio.m4a' % folder
|
origin = '%s/audio.m4a' % folder
|
||||||
|
@ -129,9 +123,6 @@ def test_set_location():
|
||||||
assert helper.isclose(metadata['longitude'], 99.9999999999), metadata['longitude']
|
assert helper.isclose(metadata['longitude'], 99.9999999999), metadata['longitude']
|
||||||
|
|
||||||
def test_set_location_minus():
|
def test_set_location_minus():
|
||||||
if not can_edit_exif():
|
|
||||||
raise SkipTest('avmetareadwrite executable not found')
|
|
||||||
|
|
||||||
temporary_folder, folder = helper.create_working_folder()
|
temporary_folder, folder = helper.create_working_folder()
|
||||||
|
|
||||||
origin = '%s/audio.m4a' % folder
|
origin = '%s/audio.m4a' % folder
|
||||||
|
@ -158,9 +149,6 @@ def test_set_location_minus():
|
||||||
assert helper.isclose(metadata['longitude'], -99.999999), metadata['longitude']
|
assert helper.isclose(metadata['longitude'], -99.999999), metadata['longitude']
|
||||||
|
|
||||||
def test_set_title():
|
def test_set_title():
|
||||||
if not can_edit_exif():
|
|
||||||
raise SkipTest('avmetareadwrite executable not found')
|
|
||||||
|
|
||||||
temporary_folder, folder = helper.create_working_folder()
|
temporary_folder, folder = helper.create_working_folder()
|
||||||
|
|
||||||
origin = '%s/audio.m4a' % folder
|
origin = '%s/audio.m4a' % folder
|
||||||
|
@ -181,9 +169,6 @@ def test_set_title():
|
||||||
assert metadata['title'] == 'my audio title', metadata['title']
|
assert metadata['title'] == 'my audio title', metadata['title']
|
||||||
|
|
||||||
def test_set_title_non_ascii():
|
def test_set_title_non_ascii():
|
||||||
if not can_edit_exif():
|
|
||||||
raise SkipTest('avmetareadwrite executable not found')
|
|
||||||
|
|
||||||
raise SkipTest('gh-27, non-ascii characters')
|
raise SkipTest('gh-27, non-ascii characters')
|
||||||
temporary_folder, folder = helper.create_working_folder()
|
temporary_folder, folder = helper.create_working_folder()
|
||||||
|
|
||||||
|
@ -203,7 +188,3 @@ def test_set_title_non_ascii():
|
||||||
shutil.rmtree(folder)
|
shutil.rmtree(folder)
|
||||||
|
|
||||||
assert metadata['title'] == '形声字 / 形聲字', metadata['title']
|
assert metadata['title'] == '形声字 / 形聲字', metadata['title']
|
||||||
|
|
||||||
def can_edit_exif():
|
|
||||||
audio = Audio()
|
|
||||||
return audio.get_avmetareadwrite()
|
|
||||||
|
|
|
@ -101,9 +101,6 @@ def test_set_album():
|
||||||
assert metadata_new['album'] == 'Test Album', metadata_new['album']
|
assert metadata_new['album'] == 'Test Album', metadata_new['album']
|
||||||
|
|
||||||
def test_set_date_taken():
|
def test_set_date_taken():
|
||||||
if not can_edit_exif():
|
|
||||||
raise SkipTest('avmetareadwrite executable not found')
|
|
||||||
|
|
||||||
temporary_folder, folder = helper.create_working_folder()
|
temporary_folder, folder = helper.create_working_folder()
|
||||||
|
|
||||||
origin = '%s/video.mov' % 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']
|
assert date_taken == (2013, 9, 30, 7, 6, 5, 0, 273, 0), metadata['date_taken']
|
||||||
|
|
||||||
def test_set_location():
|
def test_set_location():
|
||||||
if not can_edit_exif():
|
|
||||||
raise SkipTest('avmetareadwrite executable not found')
|
|
||||||
|
|
||||||
temporary_folder, folder = helper.create_working_folder()
|
temporary_folder, folder = helper.create_working_folder()
|
||||||
|
|
||||||
origin = '%s/video.mov' % folder
|
origin = '%s/video.mov' % folder
|
||||||
|
@ -153,9 +147,6 @@ def test_set_location():
|
||||||
assert helper.isclose(metadata['longitude'], 99.9999999999), metadata['longitude']
|
assert helper.isclose(metadata['longitude'], 99.9999999999), metadata['longitude']
|
||||||
|
|
||||||
def test_set_title():
|
def test_set_title():
|
||||||
if not can_edit_exif():
|
|
||||||
raise SkipTest('avmetareadwrite executable not found')
|
|
||||||
|
|
||||||
temporary_folder, folder = helper.create_working_folder()
|
temporary_folder, folder = helper.create_working_folder()
|
||||||
|
|
||||||
origin = '%s/video.mov' % folder
|
origin = '%s/video.mov' % folder
|
||||||
|
@ -176,9 +167,6 @@ def test_set_title():
|
||||||
assert metadata['title'] == 'my video title', metadata['title']
|
assert metadata['title'] == 'my video title', metadata['title']
|
||||||
|
|
||||||
def test_set_title_non_ascii():
|
def test_set_title_non_ascii():
|
||||||
if not can_edit_exif():
|
|
||||||
raise SkipTest('avmetareadwrite executable not found')
|
|
||||||
|
|
||||||
raise SkipTest('gh-27, non-ascii characters')
|
raise SkipTest('gh-27, non-ascii characters')
|
||||||
temporary_folder, folder = helper.create_working_folder()
|
temporary_folder, folder = helper.create_working_folder()
|
||||||
|
|
||||||
|
@ -198,7 +186,3 @@ def test_set_title_non_ascii():
|
||||||
shutil.rmtree(folder)
|
shutil.rmtree(folder)
|
||||||
|
|
||||||
assert metadata['title'] == '形声字 / 形聲字', metadata['title']
|
assert metadata['title'] == '形声字 / 形聲字', metadata['title']
|
||||||
|
|
||||||
def can_edit_exif():
|
|
||||||
video = Video()
|
|
||||||
return video.get_avmetareadwrite()
|
|
||||||
|
|
Loading…
Reference in New Issue