Commit b23a3ca2 authored by Jim Fulton's avatar Jim Fulton

Removed a mysterious, non-sensical broken test.

parent 3836b940
...@@ -266,26 +266,31 @@ class Test(unittest.TestCase): ...@@ -266,26 +266,31 @@ class Test(unittest.TestCase):
self.assert_(P.__dictoffset__ < P.__weakrefoffset__) self.assert_(P.__dictoffset__ < P.__weakrefoffset__)
self.assert_(P.__basicsize__ > Persistent.__basicsize__) self.assert_(P.__basicsize__ > Persistent.__basicsize__)
def testDeactivateErrors(self): # XXX Can anyone defend/explain the test below? The tests classes defined here
p = self.klass() # don't define __call__, so this weird test will always pass, but to what
p._p_oid = '\0\0\0\0\0\0hi' # end? What the heck is the point. If a klass is given that happens
dm = DM() # to define __call__, the test *may* mysteriously fail. Who cares?
p._p_jar = dm
## def testDeactivateErrors(self):
def typeerr(*args, **kwargs): ## p = self.klass()
self.assertRaises(TypeError, p, *args, **kwargs) ## p._p_oid = '\0\0\0\0\0\0hi'
## dm = DM()
typeerr(1) ## p._p_jar = dm
typeerr(1, 2)
typeerr(spam=1) ## def typeerr(*args, **kwargs):
typeerr(spam=1, force=1) ## self.assertRaises(TypeError, p, *args, **kwargs)
p._p_changed = True ## typeerr(1)
class Err(object): ## typeerr(1, 2)
def __nonzero__(self): ## typeerr(spam=1)
raise RuntimeError ## typeerr(spam=1, force=1)
typeerr(force=Err()) ## p._p_changed = True
## class Err(object):
## def __nonzero__(self):
## raise RuntimeError
## typeerr(force=Err())
class P(Persistent): class P(Persistent):
def __init__(self): def __init__(self):
......
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