summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_tabnanny.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/test/test_tabnanny.py')
-rw-r--r--Lib/test/test_tabnanny.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/Lib/test/test_tabnanny.py b/Lib/test/test_tabnanny.py
index ec88736..845096e 100644
--- a/Lib/test/test_tabnanny.py
+++ b/Lib/test/test_tabnanny.py
@@ -5,6 +5,7 @@ Glossary:
"""
from unittest import TestCase, mock
from unittest import mock
+import errno
import tabnanny
import tokenize
import tempfile
@@ -232,7 +233,8 @@ class TestCheck(TestCase):
def test_when_no_file(self):
"""A python file which does not exist actually in system."""
path = 'no_file.py'
- err = f"{path!r}: I/O Error: [Errno 2] No such file or directory: {path!r}\n"
+ err = f"{path!r}: I/O Error: [Errno {errno.ENOENT}] " \
+ f"No such file or directory: {path!r}\n"
self.verify_tabnanny_check(path, err=err)
def test_errored_directory(self):