disabled size plausibility unit tests

because feature was disables
This commit is contained in:
Karl Voit 2019-09-03 14:23:05 +02:00
parent 1029d17146
commit e86f33a98f
2 changed files with 9 additions and 4 deletions

View file

@ -626,6 +626,10 @@ class GuessFilename(object):
| Q4A = low quality | 74992178 | 124987 |
"""
#FIXXME: 2019-08-26: disabled: correct from exception to warning #
#FIXXME: 2019-09-03: assigned tests also disabled because this function never raises the expected exception
return
TOLERANCE_FACTOR = 0.95 # To cover edge cases where a reduced file size is feasible
file_size = self.get_file_size(oldfilename)

View file

@ -166,10 +166,11 @@ class TestGuessFilename(unittest.TestCase):
"2018-06-08T17.02.06 ORF - ZIB 17 00 - size okay -- highquality.mp4")
# plausibility checks of file sizes: report non-plausible sizes
with self.assertRaises(FileSizePlausibilityException, message='file size is not plausible (too small)'):
self.guess_filename.derive_new_filename_from_old_filename("20180608T170000 ORF - ZIB 17_00 - size not okay -ORIGINAL- 2018-06-08_1700_tl__13979222__o__1892278656__s14313181_1__WEB03HD_17020613P_17024324P_Q4A.mp4")
with self.assertRaises(FileSizePlausibilityException, message='file size is not plausible (too small)'):
self.guess_filename.derive_new_filename_from_old_filename("20180608T170000 ORF - ZIB 17_00 - size not okay -ORIGINAL- 2018-06-08_1700_tl__13979222__o__1892278656__s14313181_1__WEB03HD_17020613P_17024324P_Q8C.mp4")
#FIXXME: 2019-09-03: tests disabled because the function was disabled and never raises the expected exception
#with self.assertRaises(FileSizePlausibilityException, message='file size is not plausible (too small)'):
# self.guess_filename.derive_new_filename_from_old_filename("20180608T170000 ORF - ZIB 17_00 - size not okay -ORIGINAL- 2018-06-08_1700_tl__13979222__o__1892278656__s14313181_1__WEB03HD_17020613P_18024324P_Q4A.mp4")
#with self.assertRaises(FileSizePlausibilityException, message='file size is not plausible (too small)'):
# self.guess_filename.derive_new_filename_from_old_filename("20180608T170000 ORF - ZIB 17_00 - size not okay -ORIGINAL- 2018-06-08_1700_tl__13979222__o__1892278656__s14313181_1__WEB03HD_17020613P_18024324P_Q8C.mp4")
# You might think that it should be 2018-06-09 instead of 2018-06-10. This is caused by different
# day of metadata from filename (after midnight) and metadata from time-stamp (seconds before midnight):