diff options
author | Guido van Rossum <guido@python.org> | 2006-05-26 19:12:38 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 2006-05-26 19:12:38 (GMT) |
commit | 65810fee5e961af07fb964252b794c67162f98ee (patch) | |
tree | 7400532588af74faa31a12c31492839ab2e06c9a /Lib/test/test_new.py | |
parent | 2018831b2b2106499a43b37e49e24f7f14154d35 (diff) | |
download | cpython-65810fee5e961af07fb964252b794c67162f98ee.zip cpython-65810fee5e961af07fb964252b794c67162f98ee.tar.gz cpython-65810fee5e961af07fb964252b794c67162f98ee.tar.bz2 |
SF patch 1495675: Remove types.InstanceType and new.instance
(Collin Winter)
Diffstat (limited to 'Lib/test/test_new.py')
-rw-r--r-- | Lib/test/test_new.py | 14 |
1 files changed, 2 insertions, 12 deletions
diff --git a/Lib/test/test_new.py b/Lib/test/test_new.py index 4aab1e2..2819923 100644 --- a/Lib/test/test_new.py +++ b/Lib/test/test_new.py @@ -21,22 +21,12 @@ print 'new.classobj()' C = new.classobj('Spam', (Spam.Eggs,), {'get_more_yolks': get_more_yolks}) if verbose: print C -print 'new.instance()' -c = new.instance(C, {'yolks': 3}) -if verbose: - print c -o = new.instance(C) -verify(o.__dict__ == {}, - "new __dict__ should be empty") -del o -o = new.instance(C, None) -verify(o.__dict__ == {}, - "new __dict__ should be empty") -del o def break_yolks(self): self.yolks = self.yolks - 2 print 'new.instancemethod()' +c = C() +c.yolks = 3 im = new.instancemethod(break_yolks, c, C) if verbose: print im |