Skip to content

Commit 8aa7f43

Browse files
committed
be explicit about myunit test files
1 parent 7fd9568 commit 8aa7f43

File tree

1 file changed

+26
-12
lines changed

1 file changed

+26
-12
lines changed

runtests.py

Lines changed: 26 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -195,18 +195,31 @@ def add_imports(driver: Driver) -> None:
195195
driver.add_python_string('import %s' % mod, 'import %s' % mod)
196196

197197

198-
PYTEST_FILES = [os.path.join('mypy', 'test', '{}.py'.format(name)) for name in [
199-
'testcheck',
200-
'testextensions',
201-
'testdeps',
202-
'testdiff',
203-
'testfinegrained',
204-
'testmerge',
205-
'testtransform',
206-
'testtypegen',
207-
'testparse',
208-
'testsemanal',
209-
]]
198+
PYTEST_FILES = [
199+
'mypy/test/testcheck.py',
200+
'mypy/test/testextensions.py',
201+
'mypy/test/testdeps.py',
202+
'mypy/test/testdiff.py',
203+
'mypy/test/testfinegrained.py',
204+
'mypy/test/testmerge.py',
205+
'mypy/test/testtransform.py',
206+
'mypy/test/testtypegen.py',
207+
'mypy/test/testparse.py',
208+
'mypy/test/testsemanal.py',
209+
]
210+
211+
MYUNIT_FILES = [
212+
'mypy/test/teststubgen.py', # contains data-driven suite
213+
214+
'mypy/test/testargs.py',
215+
'mypy/test/testgraph.py',
216+
'mypy/test/testinfer.py',
217+
'mypy/test/testmoduleinfo.py',
218+
'mypy/test/testreports.py',
219+
'mypy/test/testsolve.py',
220+
'mypy/test/testsubtypes.py',
221+
'mypy/test/testtypes.py'
222+
]
210223

211224

212225
def add_pytest(driver: Driver) -> None:
@@ -233,6 +246,7 @@ def add_myunit(driver: Driver) -> None:
233246
# This module has been converted to pytest; don't try to use myunit.
234247
pass
235248
else:
249+
assert f in MYUNIT_FILES, f
236250
driver.add_python_mod('unit-test %s' % mod, 'mypy.myunit', '-m', mod,
237251
*driver.arglist, coverage=True)
238252

0 commit comments

Comments
 (0)