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

Fixes Issue #1086 #1087

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions nose/selector.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
thinks may be a test.
"""
import logging
import stat
import os
import unittest
from nose.config import Config
Expand Down Expand Up @@ -123,6 +124,11 @@ def wantFile(self, file):
if not self.config.includeExe and is_executable(file):
log.info('%s is executable; skipped', file)
return False

if os.path.exists(file) and not stat.S_ISREG((os.stat(file)).st_mode):
log.info('%s is not a regular file; skipped', file)
return False

dummy, ext = op_splitext(base)
pysrc = ext == '.py'

Expand Down
2 changes: 2 additions & 0 deletions unit_tests/test_selector.py
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,8 @@ def test_want_file(self):
assert not s.wantFile('test_data.txt')
assert not s.wantFile('data.text')
assert not s.wantFile('bar/baz/__init__.py')

assert not s.wantFile('fifo.py')

def test_want_function(self):
def foo():
Expand Down