diff --git a/os/test_filestat.py b/os/test_filestat.py index 91014a92..467fbd1f 100644 --- a/os/test_filestat.py +++ b/os/test_filestat.py @@ -1,5 +1,9 @@ import os -assert os.access("test_filestat.py", os.F_OK) == True -assert os.access("test_filestat.py-not", os.F_OK) == False +dir = "." +if "/" in __file__: + dir = __file__.rsplit("/", 1)[0] + +assert os.access(dir + "/test_filestat.py", os.F_OK) == True +assert os.access(dir + "/test_filestat.py-not", os.F_OK) == False