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

Symlinks not excluded by nose-exclude #7

Open
brandones opened this issue Oct 6, 2015 · 2 comments
Open

Symlinks not excluded by nose-exclude #7

brandones opened this issue Oct 6, 2015 · 2 comments

Comments

@brandones
Copy link

In my GAE project, I have a directory structure like

env/lib/python2.7/site-packages/
src/
  |---- application/
  |---- lib/
  |---- tests/

where src/lib is a symlink to env/lib/python2.7/site-packages/.

When I run tests with cd src; ../env/bin/nosetests --exclude-dir=lib --with-gae, all the tests in env/lib/python2.7/site-packages/ get run. There is no error message as happens when I provide a non-existent directory to exclude-dir. Clearly, the path is being found, but is not actually being excluded.

@domoritz
Copy link

domoritz commented Nov 1, 2015

I'm seeing a similar issue. Coincidentally I am also using gae. Could it be related to gae?

asfaltboy pushed a commit to asfaltboy/nose-exclude that referenced this issue Nov 24, 2015
keeps the behavior or excluding symlink's `real_path` as well as excluding the `symlink` itself

attempts to fix kgrandis#7
@asfaltboy
Copy link

I am not using gae, however I still experience this behavior. From looking at the codes, I can see that the method wantDirectory explicitly converts any symlink to a realpath by choice.

The question is whether this is due to a feature (excluding real path will always exclude any symlinks to it too) or a limitation; I'm inclined to believe the former, which is why I've submitted PR #10 which suggest to check for both real and symlink paths in excluded dirs.

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

No branches or pull requests

3 participants