forked from LBRYCommunity/lbry-sdk
removed unnecessary try/finally
This commit is contained in:
parent
153bdf576a
commit
3a3c63956a
1 changed files with 7 additions and 14 deletions
|
@ -2,10 +2,9 @@ import logging
|
||||||
import pathlib
|
import pathlib
|
||||||
import time
|
import time
|
||||||
|
|
||||||
import lbry.wallet # just to make the following line work:
|
from .test_claim_commands import ClaimTestCase
|
||||||
from lbry.conf import TranscodeConfig
|
from lbry.conf import TranscodeConfig
|
||||||
from lbry.file_analysis import VideoFileAnalyzer
|
from lbry.file_analysis import VideoFileAnalyzer
|
||||||
from .test_claim_commands import ClaimTestCase
|
|
||||||
|
|
||||||
log = logging.getLogger(__name__)
|
log = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
@ -60,12 +59,9 @@ class TranscodeValidation(ClaimTestCase):
|
||||||
self.assertEqual(self.video_file_webm, new_file_name)
|
self.assertEqual(self.video_file_webm, new_file_name)
|
||||||
|
|
||||||
async def test_volume(self):
|
async def test_volume(self):
|
||||||
try:
|
self.conf.volume_analysis_time = 200
|
||||||
self.conf.volume_analysis_time = 200
|
with self.assertRaisesRegex(Exception, "lower than prime"):
|
||||||
with self.assertRaisesRegex(Exception, "lower than prime"):
|
await self.analyzer.verify_or_repair(True, False, self.video_file_name)
|
||||||
await self.analyzer.verify_or_repair(True, False, self.video_file_name)
|
|
||||||
finally:
|
|
||||||
self.conf.volume_analysis_time = 0
|
|
||||||
|
|
||||||
async def test_container(self):
|
async def test_container(self):
|
||||||
file_name = self.make_name("bad_container", ".avi")
|
file_name = self.make_name("bad_container", ".avi")
|
||||||
|
@ -150,9 +146,6 @@ class TranscodeValidation(ClaimTestCase):
|
||||||
self.assertEqual("ogg", extension)
|
self.assertEqual("ogg", extension)
|
||||||
|
|
||||||
async def test_no_ffmpeg(self):
|
async def test_no_ffmpeg(self):
|
||||||
try:
|
self.conf.ffmpeg_folder = "I don't really exist/"
|
||||||
self.conf.ffmpeg_folder = "I don't really exist/"
|
with self.assertRaisesRegex(Exception, "Unable to locate"):
|
||||||
with self.assertRaisesRegex(Exception, "Unable to locate"):
|
await self.analyzer.verify_or_repair(True, False, self.video_file_name)
|
||||||
await self.analyzer.verify_or_repair(True, False, self.video_file_name)
|
|
||||||
finally:
|
|
||||||
self.conf.ffmpeg_folder = ""
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue