aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJesús Eduardo <heckyel@hyperbola.info>2018-01-18 17:00:31 -0500
committerJesús Eduardo <heckyel@hyperbola.info>2018-01-18 17:00:31 -0500
commitd33fa00136d728854ad4099c48e0076af19a8ce8 (patch)
tree4d7a3ec60180fd43769d8ec5c8739f20700f2675
parent3ea7ac30ac0754370b4f9e146002d359833e2a6d (diff)
downloadlibrevideoconverter-d33fa00136d728854ad4099c48e0076af19a8ce8.tar.lz
librevideoconverter-d33fa00136d728854ad4099c48e0076af19a8ce8.tar.xz
librevideoconverter-d33fa00136d728854ad4099c48e0076af19a8ce8.zip
pep8 en test/uitests.sikuli/test_conversions.py
-rw-r--r--test/uitests.sikuli/test_conversions.py57
1 files changed, 28 insertions, 29 deletions
diff --git a/test/uitests.sikuli/test_conversions.py b/test/uitests.sikuli/test_conversions.py
index a150e43..c186c62 100644
--- a/test/uitests.sikuli/test_conversions.py
+++ b/test/uitests.sikuli/test_conversions.py
@@ -20,7 +20,8 @@ class Test_Conversions(unittest.TestCase):
def setUp(self):
"""
- Each tests assumes that I there are files in the list ready to be converted to some format.
+ Each tests assumes that I there are files in the
+ list ready to be converted to some format.
"""
self.lvc = MVCGui()
@@ -31,12 +32,11 @@ class Test_Conversions(unittest.TestCase):
self.output_dir = tempfile.mkdtemp()
self.lvc.choose_save_location(self.output_dir)
-
def test_send_file_to_itunes(self):
"""Scenario: Send to iTunes.
-
+
Given I have "Send to iTunes" checked
- When I convert the an apple format
+ When I convert the an apple format
Then the file is added to my iTunes library
"""
item = "mp4-0.mp4"
@@ -46,7 +46,6 @@ class Test_Conversions(unittest.TestCase):
lvc.start_conversions()
lvc.verify_completed(item, 30)
assert lvc.verify_itunes(item)
-
def test_verify_custom_output_directory(self):
"""Scenario: File in specific output location.
@@ -56,7 +55,7 @@ class Test_Conversions(unittest.TestCase):
Then the output file is in the specified directory
"""
- custom_output_dir = os.path.join(os.getenv("HOME"),"Desktop")
+ custom_output_dir = os.path.join(os.getenv("HOME"), "Desktop")
item = "mp4-0.mp4"
lvc.lvcGui()
lvc.choose_device_conversion("KindleFire")
@@ -84,48 +83,50 @@ class Test_Conversions(unittest.TestCase):
def test_output_file_name_in_default_dir(self):
"""Scenario: Output file name when saved in default (same) directory.
-
+
When I convert a file
- Then it is named with the file name (or even better item title) as the base
- And the output container is the extension
+ Then it is named with the file name (or even better item title)
+ as the base and the output container is the extension
"""
self.fail('I do not know the planned naming convention yet')
def test_output_file_name_in_custom_dir(self):
"""Scenario: Output file name when saved in default (same) directory.
-
+
When I convert a file
- Then it is named with the file name (or even better item title) as the base
- And the output container is the extension
+ Then it is named with the file name (or even better item title)
+ as the base and the output container is the extension
"""
self.fail('I do not know the planned naminig convention yet')
def test_output_video_no_upsize(self):
datadir, testfile = data.test_data()
- item = testfile[0] #mp4-0.mp4 is smaller than the Apple Universal Setting
+ item = testfile[0]
+ # mp4-0.mp4 is smaller than the Apple Universal Setting
lvc.lvcGui()
lvc.choose_device_conversion("Apple Universal")
lvc.choose_dont_upsize('on')
lvc.start_conversion()
assert lvc.verify_size(os.path.join(datadir, item), width, height)
-
"""Scenario: Output file video size.
When I convert a file to "format"
And Don't Upsize is selected
- Then the output file dimensions are not changed if the input file is smaller than the device
+ Then the output file dimensions are not changed if the
+ input file is smaller than the device
"""
-
- ##This test is best covered more completely in unittests to verify that we resize according to device sizes
- item = "mp4-0.mp4" #mp4-0.mp4 is smaller than the Apple Universal Setting
+
+ # This test is best covered more completely in unittests to verify
+ # that we resize according to device sizes
+ item = "mp4-0.mp4"
+ # mp4-0.mp4 is smaller than the Apple Universal Setting
lvc.lvcGui()
lvc.choose_device_conversion("Apple Universal")
lvc.choose_dont_upsize('on')
lvc.start_conversion()
- assert lvc.verify_size(os.path.join(self.output_dir, item), width, height)
-
-
+ assert lvc.verify_size(os.path.join(self.output_dir, item),
+ width, height)
def test_output_video_upsize(self):
"""Scenario: Output file video size.
@@ -134,15 +135,17 @@ class Test_Conversions(unittest.TestCase):
And Don't Upsize is NOT selected
The the output file dimensions are changed to match the device spec.
"""
-
-##This test is best covered more completely in unittests to verify that we resize according to device sizes
+ # This test is best covered more completely in unittests to verify
+ # that we resize according to device sizes
- item = "mp4-0.mp4" #mp4-0.mp4 is smaller than the Apple Universal Setting
+ item = "mp4-0.mp4"
+ # mp4-0.mp4 is smaller than the Apple Universal Setting
lvc.lvcGui()
lvc.choose_device_conversion("Apple Universal")
lvc.choose_dont_upsize('off')
lvc.start_conversion()
- assert lvc.verify_size(os.path.join(self.output_dir, item), width, height)
+ assert lvc.verify_size(os.path.join(self.output_dir, item),
+ width, height)
def test_completed_conversions_display(self):
"""Scenario: File displays as completed.
@@ -157,7 +160,6 @@ class Test_Conversions(unittest.TestCase):
lvc.start_conversions()
assert lvc.verify_completed(item, 30)
-
def test_failed_conversion_display(self):
"""Scenario: File fails conversion.
When I convert a "file" to "format"
@@ -172,7 +174,6 @@ class Test_Conversions(unittest.TestCase):
lvc.start_conversion()
assert lvc.verify_failed(item)
-
def test_ffmpeg_log_output_on_failure(self):
"""Scenario: Show ffmpeg output.
@@ -188,9 +189,7 @@ class Test_Conversions(unittest.TestCase):
lvc.start_conversion()
lvc.verify_failed(item)
assert lvc.show_ffmpeg_output(item)
-
def tearDown(self):
shutil.rmtree(self.output_dir)
self.lvc_quit()
-