diff --git a/Lib/test/test_tarfile.py b/Lib/test/test_tarfile.py index 57fc062cae5..f64964dd1da 100644 --- a/Lib/test/test_tarfile.py +++ b/Lib/test/test_tarfile.py @@ -243,7 +243,7 @@ def test_non_existent_tarfile(self): if sys.platform == 'win32' and '|' in self.mode: # Issue #20384: On Windows os.open() error message doesn't # contain file name. - text = '' + test = '' with self.assertRaisesRegex(FileNotFoundError, test): tarfile.open("xxx", self.mode)