[Python-checkins] CVS: python/dist/src/Lib/test test_descrtut.py,1.3,1.4

Tim Peters tim_one@users.sourceforge.net
Sat, 08 Sep 2001 18:21:33 -0700


Update of /cvsroot/python/python/dist/src/Lib/test
In directory usw-pr-cvs1:/tmp/cvs-serv17393

Modified Files:
	test_descrtut.py 
Log Message:
Force "test." into the start of the module name, inherited by class and
type reprs, to accomodate the way Jack runs tests on the Mac.


Index: test_descrtut.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/test/test_descrtut.py,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** test_descrtut.py	2001/09/06 21:56:42	1.3
--- test_descrtut.py	2001/09/09 01:21:31	1.4
***************
*** 38,42 ****
  
      >>> print defaultdict               # show our type
!     <type 'test_descrtut.defaultdict'>
      >>> print type(defaultdict)         # its metatype
      <type 'type'>
--- 38,42 ----
  
      >>> print defaultdict               # show our type
!     <type 'test.test_descrtut.defaultdict'>
      >>> print type(defaultdict)         # its metatype
      <type 'type'>
***************
*** 45,51 ****
      {}
      >>> print type(a)                   # show its type
!     <type 'test_descrtut.defaultdict'>
      >>> print a.__class__               # show its class
!     <type 'test_descrtut.defaultdict'>
      >>> print type(a) is a.__class__    # its type is its class
      1
--- 45,51 ----
      {}
      >>> print type(a)                   # show its type
!     <type 'test.test_descrtut.defaultdict'>
      >>> print a.__class__               # show its class
!     <type 'test.test_descrtut.defaultdict'>
      >>> print type(a) is a.__class__    # its type is its class
      1
***************
*** 270,277 ****
  
      >>> C.foo(1)
!     classmethod test_descrtut.C 1
      >>> c = C()
      >>> c.foo(1)
!     classmethod test_descrtut.C 1
  
      >>> class D(C):
--- 270,277 ----
  
      >>> C.foo(1)
!     classmethod test.test_descrtut.C 1
      >>> c = C()
      >>> c.foo(1)
!     classmethod test.test_descrtut.C 1
  
      >>> class D(C):
***************
*** 279,286 ****
  
      >>> D.foo(1)
!     classmethod test_descrtut.D 1
      >>> d = D()
      >>> d.foo(1)
!     classmethod test_descrtut.D 1
  
  This prints "classmethod __main__.D 1" both times; in other words, the
--- 279,286 ----
  
      >>> D.foo(1)
!     classmethod test.test_descrtut.D 1
      >>> d = D()
      >>> d.foo(1)
!     classmethod test.test_descrtut.D 1
  
  This prints "classmethod __main__.D 1" both times; in other words, the
***************
*** 298,306 ****
      >>> E.foo(1)
      E.foo() called
!     classmethod test_descrtut.C 1
      >>> e = E()
      >>> e.foo(1)
      E.foo() called
!     classmethod test_descrtut.C 1
  
  In this example, the call to C.foo() from E.foo() will see class C as its
--- 298,306 ----
      >>> E.foo(1)
      E.foo() called
!     classmethod test.test_descrtut.C 1
      >>> e = E()
      >>> e.foo(1)
      E.foo() called
!     classmethod test.test_descrtut.C 1
  
  In this example, the call to C.foo() from E.foo() will see class C as its
***************
*** 486,497 ****
  # so this works as expected in both ways of running regrtest.
  def test_main():
!     import doctest, test_descrtut
!     if 0:   # change to 1 to run forever (to check for leaks)
!         while 1:
!             doctest.master = None
!             doctest.testmod(test_descrtut)
!             print ".",
!     else:
!         doctest.testmod(test_descrtut)
  
  # This part isn't needed for regrtest, but for running the test directly.
--- 486,491 ----
  # so this works as expected in both ways of running regrtest.
  def test_main():
!     import doctest, test.test_descrtut
!     doctest.testmod(test.test_descrtut)
  
  # This part isn't needed for regrtest, but for running the test directly.