8000 add test · RustPython/RustPython@79c6ff5 · GitHub
[go: up one dir, main page]

Skip to content

Commit 79c6ff5

committed
add test
1 parent 499322a commit 79c6ff5

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

extra_tests/snippets/stdlib_os.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberD 88EC iff line change
@@ -518,3 +518,13 @@ def __exit__(self, exc_type, exc_val, exc_tb):
518518
if option in ["PC_MAX_CANON", "PC_MAX_INPUT", "PC_VDISABLE"]:
519519
continue
520520
assert os.pathconf("/", index) == os.pathconf("/", option)
521+
522+
# os.access - test with empty path and nonexistent files
523+
assert os.access("", os.F_OK) is False
524+
assert os.access("", os.R_OK) is False
525+
assert os.access("", os.W_OK) is False
526+
assert os.access("", os.X_OK) is False
527+
assert os.access("nonexistent_file_12345", os.F_OK) is False
528+
assert os.access("nonexistent_file_12345", os.W_OK) is False
529+
assert os.access("README.md", os.F_OK) is True
530+
assert os.access("README.md", os.R_OK) is True

0 commit comments

Comments
 (0)
0