test_other_conversions.py 1005 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. #!/usr/bin/python
  2. import devices
  3. from sikuli.Sikuli import *
  4. import devices
  5. import config
  6. from lvcgui import MVCGui
  7. import datafiles
  8. data = datafiles.TestData()
  9. def test_other_conversions():
  10. """Scenario: test other output conversion options.
  11. """
  12. device_list = devices.devices('Other')
  13. for x in device_list:
  14. yield convert_to_format, x
  15. def convert_to_format(device_output):
  16. print(device_output)
  17. expected_failures = ['fake_video.mp4']
  18. lvc = MVCGui()
  19. lvc.lvc_focus()
  20. datadir, testfiles = data.test_data(many=True, new=True)
  21. lvc.browse_for_files(datadir, testfiles)
  22. output_dir = tempfile.mkdtemp()
  23. lvc.choose_save_location(output_dir)
  24. lvc.choose_device_conversion("device_output")
  25. lvc.start_conversions()
  26. for item in testfiles:
  27. if item in expected_failures:
  28. lvc.verify_failed(item, 120)
  29. else:
  30. lvc.verify_completed(item, 120)
  31. lvc.clear_finished_files(item)
  32. lvc.clear_and_start_over()