Lines Matching refs:tempdir
347 oldmode = mode = os.stat(tempfile.tempdir).st_mode
349 os.chmod(tempfile.tempdir, mode)
351 if os.access(tempfile.tempdir, os.W_OK):
355 self.assertEqual(os.listdir(tempfile.tempdir), [])
357 os.chmod(tempfile.tempdir, oldmode)
361 tempdir = os.path.join(tempfile.tempdir, 'nonexistent')
362 with support.swap_attr(tempfile, 'tempdir', tempdir):
368 tempdir = os.path.join(tempfile.tempdir, 'file')
369 open(tempdir, 'wb').close()
370 with support.swap_attr(tempfile, 'tempdir', tempdir):
617 _tempdir, tempfile.tempdir = tempfile.tempdir, None
624 tempfile.tempdir = _tempdir
691 orig_tempdir = tempfile.tempdir
692 self.assertIsInstance(tempfile.tempdir, (str, type(None)))
698 tempfile.tempdir = tempfile.gettempdirb()
699 self.assertIsInstance(tempfile.tempdir, bytes)
719 tempfile.tempdir = orig_tempdir
830 orig_tempdir = tempfile.tempdir
831 self.assertIsInstance(tempfile.tempdir, (str, type(None)))
836 tempfile.tempdir = tempfile.gettempdirb()
837 self.assertIsInstance(tempfile.tempdir, bytes)
853 tempfile.tempdir = orig_tempdir