Issue #17169: Restore errno in tempfile exceptions.
diff --git a/Lib/test/test_tempfile.py b/Lib/test/test_tempfile.py
index 40e5e6f..7f4d5b9 100644
--- a/Lib/test/test_tempfile.py
+++ b/Lib/test/test_tempfile.py
@@ -1,5 +1,6 @@
 # tempfile.py unit tests.
 import tempfile
+import errno
 import os
 import signal
 import sys
@@ -963,8 +964,9 @@
         # (noted as part of Issue #10188)
         with tempfile.TemporaryDirectory() as nonexistent:
             pass
-        with self.assertRaises(os.error):
+        with self.assertRaises(FileNotFoundError) as cm:
             tempfile.TemporaryDirectory(dir=nonexistent)
+        self.assertEqual(cm.exception.errno, errno.ENOENT)
 
     def test_explicit_cleanup(self):
         # A TemporaryDirectory is deleted when cleaned up