mirror of https://github.com/python/cpython
Two bugs:
- assertRaises() wasn't being called correctly - test_warning() no longer applies
This commit is contained in:
parent
78e35f9311
commit
8bec48316b
|
@ -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)
|
||||
|
||||
|
|
Loading…
Reference in New Issue