gh-61 Enable tests for audio files

This commit is contained in:
Jaisen Mathai 2016-11-07 23:20:11 -08:00
parent 3f1efe96ad
commit cb52210077
3 changed files with 6 additions and 11 deletions

View File

@ -38,7 +38,6 @@ def test_import_file_text():
assert helper.path_tz_fix(os.path.join('2016-04-Apr','Unknown Location','2016-04-07_11-15-26-valid-sample-title.txt')) in dest_path, dest_path
def test_import_file_audio():
raise SkipTest('gh-61 this test fails on travisci')
temporary_folder, folder = helper.create_working_folder()
temporary_folder_destination, folder_destination = helper.create_working_folder()
@ -52,7 +51,7 @@ def test_import_file_audio():
shutil.rmtree(folder)
shutil.rmtree(folder_destination)
assert helper.path_tz_fix(os.path.join('2016-01-Jan','Houston','2016-01-04_05-28-15-audio-test-audio.m4a')) in dest_path, dest_path
assert helper.path_tz_fix(os.path.join('2016-01-Jan','Houston','2016-01-04_05-28-15-audio.m4a')) in dest_path, dest_path
def test_import_file_photo():
temporary_folder, folder = helper.create_working_folder()

View File

@ -32,32 +32,28 @@ def test_audio_extensions():
assert extensions == valid_extensions, valid_extensions
def test_get_coordinate():
raise SkipTest('gh-61 this test fails on travisci')
audio = Audio(helper.get_file('audio.m4a'))
coordinate = audio.get_coordinate()
assert coordinate == 29.75893888888889, coordinate
assert helper.isclose(coordinate, 29.758938), coordinate
def test_get_coordinate_latitude():
raise SkipTest('gh-61 this test fails on travisci')
audio = Audio(helper.get_file('audio.m4a'))
coordinate = audio.get_coordinate('latitude')
assert coordinate == 29.75893888888889, coordinate
assert helper.isclose(coordinate, 29.758938), coordinate
def test_get_coordinate_longitude():
raise SkipTest('gh-61 this test fails on travisci')
audio = Audio(helper.get_file('audio.m4a'))
coordinate = audio.get_coordinate('longitude')
assert coordinate == -95.3677, coordinate
assert helper.isclose(coordinate, -95.3677), coordinate
def test_get_date_taken():
raise SkipTest('gh-32 this test fails on travisci')
audio = Audio(helper.get_file('audio.m4a'))
date_taken = audio.get_date_taken()
assert date_taken == (2016, 1, 4, 5, 24, 15, 0, 19, 0), date_taken
assert date_taken == (2016, 1, 4, 5, 28, 15, 0, 4, 0), date_taken
def test_get_exiftool_attributes():
audio = Video(helper.get_file('audio.m4a'))

View File

@ -317,7 +317,7 @@ def _test_photo_type_get(type, date):
if not photo_file:
photo_file = helper.download_file(photo_name, folder)
if not photo_file or not os.path.isfile(photo_file):
raise SkipTest('nef file not downlaoded')
raise SkipTest('{} file not downlaoded'.format(type))
# downloading for each test is costly so we save it in the working directory
file_path_save_as = helper.get_file_path(photo_name)