summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_os.py
diff options
context:
space:
mode:
authorpxinwr <peixing.xin@windriver.com>2020-11-28 20:21:30 (GMT)
committerGitHub <noreply@github.com>2020-11-28 20:21:30 (GMT)
commitaa1b8a168d8b8dc1dfc426364b7b664501302958 (patch)
tree3c1c20e46c3d88ece1b83dca182049ce4c5d9f39 /Lib/test/test_os.py
parentd41ec65ab7411e877ca33d05e8c900feca530635 (diff)
downloadcpython-aa1b8a168d8b8dc1dfc426364b7b664501302958.zip
cpython-aa1b8a168d8b8dc1dfc426364b7b664501302958.tar.gz
cpython-aa1b8a168d8b8dc1dfc426364b7b664501302958.tar.bz2
bpo-31904: Fix test_os.test_getcwd_long_path() failure for VxWorks (GH-20256)
Diffstat (limited to 'Lib/test/test_os.py')
-rw-r--r--Lib/test/test_os.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/Lib/test/test_os.py b/Lib/test/test_os.py
index f127cb1..dbb2975 100644
--- a/Lib/test/test_os.py
+++ b/Lib/test/test_os.py
@@ -116,6 +116,10 @@ class MiscTests(unittest.TestCase):
# than MAX_PATH if long paths support is disabled:
# see RtlAreLongPathsEnabled().
min_len = 2000 # characters
+ # On VxWorks, PATH_MAX is defined as 1024 bytes. Creating a path
+ # longer than PATH_MAX will fail.
+ if sys.platform == 'vxworks':
+ min_len = 1000
dirlen = 200 # characters
dirname = 'python_test_dir_'
dirname = dirname + ('a' * (dirlen - len(dirname)))