summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_posix.py
diff options
context:
space:
mode:
authorTrent Nelson <trent@trent.me>2012-08-29 13:20:41 (GMT)
committerTrent Nelson <trent@trent.me>2012-08-29 13:20:41 (GMT)
commitda4277a739bab61e79dc4d064b1e1648ddd59150 (patch)
tree6daf98ae796f894cca8901f72ed12797c5a2b58c /Lib/test/test_posix.py
parent23d49d3e7e386bb2b26d5b944fc123f0f21ce0a6 (diff)
downloadcpython-da4277a739bab61e79dc4d064b1e1648ddd59150.zip
cpython-da4277a739bab61e79dc4d064b1e1648ddd59150.tar.gz
cpython-da4277a739bab61e79dc4d064b1e1648ddd59150.tar.bz2
Issue #15765: Fix quirky NetBSD getcwd() behaviour.
This is done by extending a previous fix for issue #9185 that was made for Solaris and OpenBSD to NetBSD as well.
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 755a81c..2eba770 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('..')