[Python-checkins] python/dist/src/Lib/test test_descr.py,1.167,1.168
mwh@users.sourceforge.net
mwh@users.sourceforge.net
Wed, 27 Nov 2002 08:29:28 -0800
Update of /cvsroot/python/python/dist/src/Lib/test
In directory sc8-pr-cvs1:/tmp/cvs-serv12610/Lib/test
Modified Files:
test_descr.py
Log Message:
Nudge getting __module__ and __name__ for new-style classes so that
the results of *setting* __name__ are not so surprising.
If people can suggest more tests, that'd be grand, or is what's there
sufficient?
Index: test_descr.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/test/test_descr.py,v
retrieving revision 1.167
retrieving revision 1.168
diff -C2 -d -r1.167 -r1.168
*** test_descr.py 27 Nov 2002 15:40:09 -0000 1.167
--- test_descr.py 27 Nov 2002 16:29:26 -0000 1.168
***************
*** 3604,3608 ****
pass
! C.__name__ = 'C'
def test_main():
--- 3604,3616 ----
pass
! # C.__module__ could be 'test_descr' or '__main__'
! mod = C.__module__
!
! C.__name__ = 'D'
! vereq((C.__module__, C.__name__), (mod, 'D'))
!
! C.__name__ = 'D.E'
! vereq((C.__module__, C.__name__), (mod, 'D.E'))
!
def test_main():