Skip to content
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