Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Difference in islink (pyfakefs True, Python False) #365

Closed
agroce opened this issue Apr 7, 2018 · 3 comments
Closed

Difference in islink (pyfakefs True, Python False) #365

agroce opened this issue Apr 7, 2018 · 3 comments
Labels

Comments

@agroce
Copy link

agroce commented Apr 7, 2018

import shutil
import pyfakefs.fake_filesystem
import os

ROOT_PATH = "/Volumes/ramdisk/test"

fs = pyfakefs.fake_filesystem.FakeFilesystem()
fs.CreateDirectory('/Volumes')
fs.CreateDirectory('/Volumes/ramdisk')
fs.CreateDirectory('/Volumes/ramdisk/test')
os0 = pyfakefs.fake_filesystem.FakeOsModule(fs)
opener0 = pyfakefs.fake_filesystem.FakeFileOpen(fs)

if False:
    os0 = os
    shutil.rmtree(ROOT_PATH)
    os.mkdir(ROOT_PATH)

component0 = "alpha" 
path0 = ROOT_PATH 
path1 = ROOT_PATH 
path0 += os.path.sep + component0 
component0 = "" 
os0.symlink(path1,path0) 
path0 += os.path.sep + component0 
result = os0.path.islink(path0) 

print result
@mrbean-bremen
Copy link
Member

I thought you were done with pyfakefs ;)

@agroce
Copy link
Author

agroce commented Apr 8, 2018

Too good an example to ever let up on! I just was busy, and had no new toys to try out. These are accidental byproducts of looking for cases where you (or better yet OS X) fail an operation, then succeed (or fail with different error) on an immediate retry, for some work on detecting bad nondeterminism.

I'm hitting pyfakefs with afl right now, via the new afl->TSTL test generator.

@mrbean-bremen
Copy link
Member

After I fix these accidental byproducts (which may take some time, knowing your usual productivity in creating new issues) I may have a look at this stuff... sounds interesting.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants