##// END OF EJS Templates
Fix test suite when Twisted not available, cleanups to iptest for clarity.
Fernando Perez -
Show More
@@ -83,73 +83,78 b" have_gobject = test_for('gobject')"
83
83
84
84
85 def make_exclude():
85 def make_exclude():
86
86 """Make patterns of modules and packages to exclude from testing.
87 # For the IPythonDoctest plugin, we need to exclude certain patterns that
87
88 # cause testing problems. We should strive to minimize the number of
88 For the IPythonDoctest plugin, we need to exclude certain patterns that
89 # skipped modules, since this means untested code. As the testing
89 cause testing problems. We should strive to minimize the number of
90 # machinery solidifies, this list should eventually become empty.
90 skipped modules, since this means untested code. As the testing
91 # These modules and packages will NOT get scanned by nose at all for tests
91 machinery solidifies, this list should eventually become empty.
92 exclusions = [pjoin('IPython', 'external'),
92 These modules and packages will NOT get scanned by nose at all for tests.
93 pjoin('IPython', 'frontend', 'process', 'winprocess.py'),
93 """
94 # Simple utility to make IPython paths more readably, we need a lot of
95 # these below
96 ipjoin = lambda *paths: pjoin('IPython', *paths)
97
98 exclusions = [ipjoin('external'),
99 ipjoin('frontend', 'process', 'winprocess.py'),
94 pjoin('IPython_doctest_plugin'),
100 pjoin('IPython_doctest_plugin'),
95 pjoin('IPython', 'quarantine'),
101 ipjoin('quarantine'),
96 pjoin('IPython', 'deathrow'),
102 ipjoin('deathrow'),
97 pjoin('IPython', 'testing', 'attic'),
103 ipjoin('testing', 'attic'),
98 pjoin('IPython', 'testing', 'tools'),
104 ipjoin('testing', 'tools'),
99 pjoin('IPython', 'testing', 'mkdoctests'),
105 ipjoin('testing', 'mkdoctests'),
100 pjoin('IPython', 'lib', 'inputhook'),
106 ipjoin('lib', 'inputhook'),
101 # Config files aren't really importable stand-alone
107 # Config files aren't really importable stand-alone
102 pjoin('IPython', 'config', 'default'),
108 ipjoin('config', 'default'),
103 pjoin('IPython', 'config', 'profile'),
109 ipjoin('config', 'profile'),
104 ]
110 ]
105
111
106 if not have_wx:
112 if not have_wx:
107 exclusions.append(pjoin('IPython', 'gui'))
113 exclusions.append(ipjoin('gui'))
108 exclusions.append(pjoin('IPython', 'frontend', 'wx'))
114 exclusions.append(ipjoin('frontend', 'wx'))
109 exclusions.append(pjoin('IPython', 'lib', 'inputhookwx'))
115 exclusions.append(ipjoin('lib', 'inputhookwx'))
110
116
111 if not have_gtk or not have_gobject:
117 if not have_gtk or not have_gobject:
112 exclusions.append(pjoin('IPython', 'lib', 'inputhookgtk'))
118 exclusions.append(ipjoin('lib', 'inputhookgtk'))
113
119
114 if not have_wx_aui:
120 if not have_wx_aui:
115 exclusions.append(pjoin('IPython', 'gui', 'wx', 'wxIPython'))
121 exclusions.append(ipjoin('gui', 'wx', 'wxIPython'))
116
122
117 if not have_objc:
123 if not have_objc:
118 exclusions.append(pjoin('IPython', 'frontend', 'cocoa'))
124 exclusions.append(ipjoin('frontend', 'cocoa'))
119
125
120 if not sys.platform == 'win32':
126 if not sys.platform == 'win32':
121 exclusions.append(pjoin('IPython', 'utils', 'platutils_win32'))
127 exclusions.append(ipjoin('utils', 'platutils_win32'))
122
128
123 # These have to be skipped on win32 because the use echo, rm, cd, etc.
129 # These have to be skipped on win32 because the use echo, rm, cd, etc.
124 # See ticket https://bugs.launchpad.net/bugs/366982
130 # See ticket https://bugs.launchpad.net/bugs/366982
125 if sys.platform == 'win32':
131 if sys.platform == 'win32':
126 exclusions.append(pjoin('IPython', 'testing', 'plugin', 'test_exampleip'))
132 exclusions.append(ipjoin('testing', 'plugin', 'test_exampleip'))
127 exclusions.append(pjoin('IPython', 'testing', 'plugin', 'dtexample'))
133 exclusions.append(ipjoin('testing', 'plugin', 'dtexample'))
128
134
129 if not os.name == 'posix':
135 if not os.name == 'posix':
130 exclusions.append(pjoin('IPython', 'utils', 'platutils_posix'))
136 exclusions.append(ipjoin('utils', 'platutils_posix'))
131
137
132 if not have_pexpect:
138 if not have_pexpect:
133 exclusions.append(pjoin('IPython', 'scripts', 'irunner'))
139 exclusions.append(ipjoin('scripts', 'irunner'))
134
140
135 # This is scary. We still have things in frontend and testing that
141 # This is scary. We still have things in frontend and testing that
136 # are being tested by nose that use twisted. We need to rethink
142 # are being tested by nose that use twisted. We need to rethink
137 # how we are isolating dependencies in testing.
143 # how we are isolating dependencies in testing.
138 if not (have_twisted and have_zi and have_foolscap):
144 if not (have_twisted and have_zi and have_foolscap):
139 exclusions.append(pjoin('IPython', 'frontend', 'asyncfrontendbase'))
145 exclusions.extend(
140 exclusions.append(pjoin('IPython', 'frontend', 'prefilterfrontend'))
146 [ipjoin('frontend', 'asyncfrontendbase'),
141 exclusions.append(pjoin('IPython', 'frontend', 'frontendbase'))
147 ipjoin('frontend', 'prefilterfrontend'),
142 exclusions.append(pjoin('IPython', 'frontend', 'linefrontendbase'))
148 ipjoin('frontend', 'frontendbase'),
143 exclusions.append(pjoin('IPython', 'frontend', 'tests',
149 ipjoin('frontend', 'linefrontendbase'),
144 'test_linefrontend'))
150 ipjoin('frontend', 'tests', 'test_linefrontend'),
145 exclusions.append(pjoin('IPython', 'frontend', 'tests',
151 ipjoin('frontend', 'tests', 'test_frontendbase'),
146 'test_frontendbase'))
152 ipjoin('frontend', 'tests', 'test_prefilterfrontend'),
147 exclusions.append(pjoin('IPython', 'frontend', 'tests',
153 ipjoin('frontend', 'tests', 'test_asyncfrontendbase'),
148 'test_prefilterfrontend'))
154 ipjoin('testing', 'parametric'),
149 exclusions.append(pjoin('IPython', 'frontend', 'tests',
155 ipjoin('testing', 'util'),
150 'test_asyncfrontendbase')),
156 ipjoin('testing', 'tests', 'test_decorators_trial'),
151 exclusions.append(pjoin('IPython', 'testing', 'parametric'))
157 ] )
152 exclusions.append(pjoin('IPython', 'testing', 'util'))
153
158
154 # This is needed for the reg-exp to match on win32 in the ipdoctest plugin.
159 # This is needed for the reg-exp to match on win32 in the ipdoctest plugin.
155 if sys.platform == 'win32':
160 if sys.platform == 'win32':
General Comments 0
You need to be logged in to leave comments. Login now