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