[Zope3-checkins] CVS: Zope3/lib/python/Persistence/tests - testPersistence.py:1.8
Jeremy Hylton
jeremy@zope.com
Thu, 10 Oct 2002 18:30:17 -0400
Update of /cvs-repository/Zope3/lib/python/Persistence/tests
In directory cvs.zope.org:/tmp/cvs-serv28435/tests
Modified Files:
testPersistence.py
Log Message:
Make sure new tests use self.klass to get at class.
=== Zope3/lib/python/Persistence/tests/testPersistence.py 1.7 => 1.8 ===
--- Zope3/lib/python/Persistence/tests/testPersistence.py:1.7 Thu Oct 10 17:36:17 2002
+++ Zope3/lib/python/Persistence/tests/testPersistence.py Thu Oct 10 18:30:17 2002
@@ -179,10 +179,10 @@
def testPicklable(self):
import pickle
- p = P()
+ p = self.klass()
p.inc()
p2 = pickle.loads(pickle.dumps(p))
- self.assertEqual(p2.__class__, P);
+ self.assertEqual(p2.__class__, self.klass);
self.assertEqual(p2.__dict__, p.__dict__)
def testPicklableWCustomState(self):
@@ -192,13 +192,10 @@
p2 = pickle.loads(pickle.dumps(p))
self.assertEqual(p2.__class__, P2);
self.assertEqual(p2.__dict__, {'v': 42})
-
class BasePersistentTest(Test):
klass = B
has_dict = 0
-
-# XXX should test BasePersistent, too
def test_suite():
s = unittest.TestSuite()