Skip to content

Commit f239544

Browse files
authored
Merge pull request #36 from alexamici/master
Blacklist more objects and add a way to add more at runtime.
2 parents f14ed6e + 668df4b commit f239544

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

pytest_nodev/blacklists.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131

3232
# python 2 support via python-future
3333
from __future__ import unicode_literals
34+
from builtins import open
3435

3536

3637
MODULE_BLACKLIST = [
@@ -54,6 +55,7 @@
5455

5556
# dangerous
5657
'subprocess',
58+
'smtpd',
5759

5860
# annoying
5961
'antigravity', # not sure about this one :)
@@ -83,6 +85,7 @@
8385
'posix:forkpty',
8486
'pty:fork',
8587
'_signal:default_int_handler',
88+
'signal:default_int_handler',
8689
'atexit.register',
8790

8891
# low level crashes
@@ -99,6 +102,7 @@
99102
'ensurepip:_run_pip',
100103
'idlelib.rpc:SocketIO',
101104
'numpy.core.multiarray_tests',
105+
'.*base64.*code',
102106

103107
# uninterruptable hang
104108
'compiler.ast:AugAssign',
@@ -143,3 +147,11 @@
143147
'tempfile:mktemp',
144148
'multiprocessing.util',
145149
]
150+
151+
152+
# FIXME: this is a (hopefully!) temporary hack to permit adding to the object blacklist
153+
try:
154+
with open('object_blacklist.txt') as fp:
155+
OBJECT_BLACKLIST += [line.rstrip('\n') for line in fp if line.strip()]
156+
except IOError:
157+
pass

0 commit comments

Comments
 (0)