Two bugs:

- assertRaises() wasn't being called correctly
- test_warning() no longer applies
This commit is contained in:
Fred Drake 2002-11-22 20:13:43 +00:00
parent 78e35f9311
commit 8bec48316b
1 changed files with 7 additions and 7 deletions

View File

@ -524,13 +524,13 @@ class test_mktemp(TC):
for i in extant:
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 })
## 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)