[Python-checkins] python/dist/src/Lib/test test_tempfile.py,1.11,1.12

fdrake@users.sourceforge.net fdrake@users.sourceforge.net
Fri, 22 Nov 2002 12:13:46 -0800


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

Modified Files:
	test_tempfile.py 
Log Message:
Two bugs:
- assertRaises() wasn't being called correctly
- test_warning() no longer applies


Index: test_tempfile.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/test/test_tempfile.py,v
retrieving revision 1.11
retrieving revision 1.12
diff -C2 -d -r1.11 -r1.12
*** test_tempfile.py	17 Oct 2002 22:09:03 -0000	1.11
--- test_tempfile.py	22 Nov 2002 20:13:43 -0000	1.12
***************
*** 525,535 ****
              extant[i] = self.do_create(pre="aa")
  
!     def test_warning(self):
!         # mktemp issues a warning when used
!         warnings.filterwarnings("error",
!                                 category=RuntimeWarning,
!                                 message="mktemp")
!         self.assertRaises(RuntimeWarning,
!                           tempfile.mktemp, (), { 'dir': self.dir })
  
  test_classes.append(test_mktemp)
--- 525,535 ----
              extant[i] = self.do_create(pre="aa")
  
! ##     def test_warning(self):
! ##         # mktemp issues a warning when used
! ##         warnings.filterwarnings("error",
! ##                                 category=RuntimeWarning,
! ##                                 message="mktemp")
! ##         self.assertRaises(RuntimeWarning,
! ##                           tempfile.mktemp, dir=self.dir)
  
  test_classes.append(test_mktemp)