Changing a few lines in Project._save() breaks 20 unrelated test cases. 
I'm can't understand why changing this:

        try:
             # dummy save code for now
             os.system("touch %s" % path)
             self._dirty = False
             return True
         except IOError:
             return False

to:

         try:
             fileobj = open(path, "w")
             loader = ProjectSaver.newProjectSaver("pickle")
             tree = self.toDataFormat()
             loader.saveToFile(tree, fileobj)
             self._dirty = False
             return True
         except IOError:
             return False

Causes 20-or so test failures of the form:

======================================================================
ERROR: test00 (test_timeline_objects.TestTimelineObjects)
----------------------------------------------------------------------
Traceback (most recent call last):
   File "/home/brandon/src/pitivi-trunk/tests/test_timeline_objects.py", 
line 27,
  in setUp 

     self.assertEquals(len(BrotherObjects.__instances__), 0)
AssertionError: 8 != 0

The culprit is the line:

             tree = self.toDataFormat()

If you comment out that and pass an empty dictionary to 
loader.saveToFile, nothing breaks.

I can understand why a few directly-related test cases might fail, but 
not why it would affect test cases for other serializable objects, 
especially since the test cases are run in independent harnesses. 
Bizzaro! I can almost hear the carnival calliope playing. In the 
interest of expediting the release, I'm not going to make any further 
commits.

--Brandon Lewis

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Pitivi-pitivi mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/pitivi-pitivi

Reply via email to