[pitivi] application.py, test_integration.py: changes to make running tests with UI work
- From: Edward Hervey <edwardrv src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [pitivi] application.py, test_integration.py: changes to make running tests with UI work
- Date: Fri, 20 Nov 2009 07:49:08 +0000 (UTC)
commit 806ee7f99d13b5c2d1fa3a8e2cdfc6ce31087105
Author: Brandon Lewis <brandon_lewis alum berkeley edu>
Date: Wed Nov 11 21:59:07 2009 -0800
application.py,test_integration.py: changes to make running tests with UI work
better
pitivi/application.py | 7 +++++--
tests/test_integration.py | 12 ++++++++++--
2 files changed, 15 insertions(+), 4 deletions(-)
---
diff --git a/pitivi/application.py b/pitivi/application.py
index 95c9e52..1ed81b5 100644
--- a/pitivi/application.py
+++ b/pitivi/application.py
@@ -249,8 +249,9 @@ class InteractivePitivi(Pitivi):
sys.excepthook = self._excepthook
# validate options
-
- if not options.no_ui:
+ if options.no_ui:
+ self.gui = None
+ else:
# create the ui
self.gui = PitiviMainWindow(self)
self.gui.show()
@@ -283,6 +284,8 @@ class InteractivePitivi(Pitivi):
def shutdown(self):
if Pitivi.shutdown(self):
+ if self.gui:
+ self.gui.destroy()
self.mainloop.quit()
return True
diff --git a/tests/test_integration.py b/tests/test_integration.py
index add6040..8536bff 100644
--- a/tests/test_integration.py
+++ b/tests/test_integration.py
@@ -265,6 +265,10 @@ class InstanceRunner(Signallable):
if self.no_ui:
self.instance.run(["--no-ui"])
else:
+ from pitivi.ui.zoominterface import Zoomable
+ # set a common zoom ratio so that things like edge snapping values
+ # are consistent
+ Zoomable.setZoomLevel((3 * Zoomable.zoom_steps) / 4)
self.instance.run([])
def shutDown(self):
@@ -493,13 +497,16 @@ class TestBasic(Base):
initial.matches(self.runner)
context = MoveContext(self.runner.timeline,
self.runner.video1.clip1, set())
- context.editTo(11 * gst.SECOND, 0)
context.setMode(context.RIPPLE)
- context.finish()
+ brush.scrub(context, 11 * gst.SECOND, 0, steps=0)
+
+ def scrubDone(brush):
final.matches(self.runner)
self.runner.shutDown()
self.runner.connect("timeline-configured", timelineConfigured)
+ brush = Brush(self.runner)
+ brush.connect("scrub-done", scrubDone)
self.runner.loadConfiguration(initial)
self.runner.run()
@@ -611,6 +618,7 @@ class TestRippleExtensive(Base):
clipname = "clip%d" % cur
context = MoveContext(self.runner.timeline,
getattr(self.runner.video1, clipname), set())
+ context.snap(False)
context.setMode(context.RIPPLE)
self.context = context
# this isn't a method, but an attribute that will be set by specific
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]