summaryrefslogtreecommitdiff
path: root/Lib/test/test_posix.py
diff options
context:
space:
mode:
authorVinay Sajip <vinay_sajip@yahoo.co.uk>2012-08-29 14:27:07 +0100
committerVinay Sajip <vinay_sajip@yahoo.co.uk>2012-08-29 14:27:07 +0100
commita116df0f39e0bd68b04fc3fd5cd6ebff5371ae88 (patch)
treef09e5af1f39d1c306dce06d5a94d653e00a95914 /Lib/test/test_posix.py
parent3d212e6ee5fc6efbac818dee92baad1773e9c3c2 (diff)
parentda4277a739bab61e79dc4d064b1e1648ddd59150 (diff)
downloadcpython-git-a116df0f39e0bd68b04fc3fd5cd6ebff5371ae88.tar.gz
Merged upstream changes.
Diffstat (limited to 'Lib/test/test_posix.py')
-rw-r--r--Lib/test/test_posix.py12
1 files changed, 10 insertions, 2 deletions
diff --git a/Lib/test/test_posix.py b/Lib/test/test_posix.py
index 755a81c350..2eba77043e 100644
--- a/Lib/test/test_posix.py
+++ b/Lib/test/test_posix.py
@@ -405,8 +405,16 @@ class PosixTester(unittest.TestCase):
_create_and_do_getcwd(dirname, current_path_length + len(dirname) + 1)
except OSError as e:
expected_errno = errno.ENAMETOOLONG
- if 'sunos' in sys.platform or 'openbsd' in sys.platform:
- expected_errno = errno.ERANGE # Issue 9185
+ # The following platforms have quirky getcwd()
+ # behaviour -- see issue 9185 and 15765 for
+ # more information.
+ quirky_platform = (
+ 'sunos' in sys.platform or
+ 'netbsd' in sys.platform or
+ 'openbsd' in sys.platform
+ )
+ if quirky_platform:
+ expected_errno = errno.ERANGE
self.assertEqual(e.errno, expected_errno)
finally:
os.chdir('..')