1. Ian Bicking
  2. ScriptTest
  3. Issues
Issue #1 resolved

scripttest barfs on broken symlinks

Carl Meyer
created an issue

Some (broken) Python packages might add broken symlinks into, e.g., /usr/lib/python2.6/config/ or another directory that is symlinked into a virtualenv. Often these broken symlinks don't actually cause a problem in normal usage, but: ScriptTest iterates through all the contents of the scratch virtualenv, and currently it crashes on a broken symlink. (Because broken symlinks show up in a listdir() but fail on os.stat() in FoundFile.init). It's easy enough for ScriptTest to check os.path.exists() on a path before instantiating a FoundFile; I guess this means that adding or removing a broken symlink won't be reported as a change by ScriptTest, but I'm not sure that's actually a problem).

Fixed in my fork. I haven't added a test for this (I'm getting two test failures running the ScriptTest tests with nose, with or without my changes; haven't dug in to see what's going on).

Comments (1)

  1. Log in to comment