From 7f29fd55915992ed4570461d0af40f5750bc8d91 Mon Sep 17 00:00:00 2001 From: Anthony Sottile Date: Mon, 21 May 2018 22:20:37 -0700 Subject: [PATCH] Adjust feature detection for 2.7.15 --- testing/util.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/testing/util.py b/testing/util.py index ae5ae338..42cf07eb 100644 --- a/testing/util.py +++ b/testing/util.py @@ -52,7 +52,11 @@ def broken_deep_listdir(): # pragma: no cover (platform specific) os.listdir(str('\\\\?\\') + os.path.abspath(str('.'))) except OSError: return True - else: + try: + os.listdir(b'\\\\?\C:' + b'\\' * 300) + except TypeError: + return True + except OSError: return False