Commit 3836b940 authored by Jim Fulton's avatar Jim Fulton

Renamed interface methods:

isImplementedByInstancesOf to implementedBy
  isImplementedBy            to providedBy
parent cce3c72e
...@@ -440,9 +440,9 @@ anything if you run with -O. ...@@ -440,9 +440,9 @@ anything if you run with -O.
... pass ... pass
... else: ... else:
... from persistent.interfaces import IPersistent ... from persistent.interfaces import IPersistent
... assert IPersistent.isImplementedByInstancesOf(Persistent) ... assert IPersistent.implementedBy(Persistent)
... p = Persistent() ... p = Persistent()
... assert IPersistent.isImplementedBy(p) ... assert IPersistent.providedBy(p)
... assert IPersistent.isImplementedByInstancesOf(P) ... assert IPersistent.implementedBy(P)
... p = P() ... p = P()
... assert IPersistent.isImplementedBy(p) ... assert IPersistent.providedBy(p)
...@@ -185,16 +185,16 @@ class Test(unittest.TestCase): ...@@ -185,16 +185,16 @@ class Test(unittest.TestCase):
if interfaces: if interfaces:
def testInterface(self): def testInterface(self):
self.assert_(IPersistent.isImplementedByInstancesOf(Persistent), self.assert_(IPersistent.implementedBy(Persistent),
"%s does not implement IPersistent" % Persistent) "%s does not implement IPersistent" % Persistent)
p = Persistent() p = Persistent()
self.assert_(IPersistent.isImplementedBy(p), self.assert_(IPersistent.providedBy(p),
"%s does not implement IPersistent" % p) "%s does not implement IPersistent" % p)
self.assert_(IPersistent.isImplementedByInstancesOf(P), self.assert_(IPersistent.implementedBy(P),
"%s does not implement IPersistent" % P) "%s does not implement IPersistent" % P)
p = self.klass() p = self.klass()
self.assert_(IPersistent.isImplementedBy(p), self.assert_(IPersistent.providedBy(p),
"%s does not implement IPersistent" % p) "%s does not implement IPersistent" % p)
def testDataManagerAndAttributes(self): def testDataManagerAndAttributes(self):
......
...@@ -27,7 +27,7 @@ the data actually gets written/not written to the storge. ...@@ -27,7 +27,7 @@ the data actually gets written/not written to the storge.
Obviously this test suite should be expanded. Obviously this test suite should be expanded.
$Id: abstestIDataManager.py,v 1.4 2004/02/20 16:56:57 fdrake Exp $ $Id: abstestIDataManager.py,v 1.5 2004/03/05 22:08:50 jim Exp $
""" """
from unittest import TestCase from unittest import TestCase
...@@ -60,4 +60,4 @@ class IDataManagerTests(TestCase, object): ...@@ -60,4 +60,4 @@ class IDataManagerTests(TestCase, object):
def testRollback(self): def testRollback(self):
tran = self.get_transaction() tran = self.get_transaction()
rb = self.datamgr.savepoint(tran) rb = self.datamgr.savepoint(tran)
self.assert_(IRollback.isImplementedBy(rb)) self.assert_(IRollback.providedBy(rb))
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment