Esempio n. 1
0
    def test_clear_finished_after_conversion_errors(self):
        """Scenario: Clear finished conversions after conversion errors.

           Given I convert several files and 1 that will fail
           When I clear finished conversions
           Then the completed files are removed
             And the failed conversions are removed
        """
        _, testfiles = data.test_data(many=True)
        item = 'fake_video.mp4'
        item_dir = data.testfile_attr(item, 'testdir')
        mvc = MVCGui()
        mvc.browse_for_files(item_dir, item)
        mvc.start_conversions()
        mvc.verify_conversions_finished()
        mvc.clear_and_start_over()
        assert mvc.verify_file_not_in_list(testfiles[0])
        assert mvc.verify_file_not_in_list(item)
def convert_to_format(device_output):
    print device_output
    expected_failures = ['fake_video.mp4']
    mvc = MVCGui()
    mvc.mvc_focus()
    datadir, testfiles = data.test_data(many=True, new=True)
    mvc.browse_for_files(datadir, testfiles)
    output_dir = tempfile.mkdtemp()
    mvc.choose_save_location(output_dir)
    mvc.choose_device_conversion("device_output")
    mvc.start_conversions()
    for item in testfiles:
        if item in expected_failures:
            mvc.verify_failed(item, 120)
        else:
            mvc.verify_completed(item, 120)
        mvc.clear_finished_files(item)
    mvc.clear_and_start_over()
def convert_to_format(device_output):
    print device_output
    expected_failures = ['fake_video.mp4']
    mvc = MVCGui()
    mvc.mvc_focus()
    datadir, testfiles = data.test_data(many=True, new=True)
    mvc.browse_for_files(datadir, testfiles)
    output_dir = tempfile.mkdtemp()
    mvc.choose_save_location(output_dir)
    mvc.choose_device_conversion("device_output")
    mvc.start_conversions()
    for item in testfiles:
        if item in expected_failures:
            mvc.verify_failed(item, 120)
        else:
            mvc.verify_completed(item, 120)
        mvc.clear_finished_files(item)
    mvc.clear_and_start_over()