← Back to team overview

divmod-dev team mailing list archive

[Merge] lp:~divmod-dev/divmod.org/829866-explicit-close into lp:divmod.org

 

Tristan Seligmann has proposed merging lp:~divmod-dev/divmod.org/829866-explicit-close into lp:divmod.org with lp:~divmod-dev/divmod.org/829865-PYTHONPATH-handling as a prerequisite.

Requested reviews:
  Divmod-dev (divmod-dev)
Related bugs:
  Bug #829866 in Divmod Axiom: "Explicit closes in test suite"
  https://bugs.launchpad.net/divmod-axiom/+bug/829866

For more details, see:
https://code.launchpad.net/~divmod-dev/divmod.org/829866-explicit-close/+merge/72275
-- 
https://code.launchpad.net/~divmod-dev/divmod.org/829866-explicit-close/+merge/72275
Your team Divmod-dev is requested to review the proposed merge of lp:~divmod-dev/divmod.org/829866-explicit-close into lp:divmod.org.
=== modified file 'Axiom/axiom/test/test_batch.py'
--- Axiom/axiom/test/test_batch.py	2009-07-07 20:35:43 +0000
+++ Axiom/axiom/test/test_batch.py	2011-08-20 01:56:18 +0000
@@ -562,6 +562,7 @@
         ss = substore.SubStore.createNew(s, 'substore')
         service.IService(s).startService()
         d = iaxiom.IBatchService(ss).call(BatchCallTestItem(store=ss.open()).callIt)
+        ss.close()
         def called(ign):
             self.failUnless(ss.open().findUnique(BatchCallTestItem).called, "Was not called")
             return service.IService(s).stopService()

=== modified file 'Axiom/axiom/test/test_files.py'
--- Axiom/axiom/test/test_files.py	2008-05-06 13:33:30 +0000
+++ Axiom/axiom/test/test_files.py	2011-08-20 01:56:18 +0000
@@ -73,7 +73,7 @@
         TEST_STR = "test 123"
 
         def cb(fpath):
-            fpath.open("w").write(TEST_STR)
+            fpath.setContent(TEST_STR)
 
             PathTesterItem(store=s,
                            relpath=fpath)
@@ -83,7 +83,7 @@
             s2 = Store(npath)
             pti = list(s2.query(PathTesterItem))[0]
 
-            self.assertEquals(pti.relpath.open().read(),
+            self.assertEquals(pti.relpath.getContent(),
                               TEST_STR)
 
         return rel.close().addCallback(cb)


Follow ups