Skip to content

Commit ed5de7d

Browse files
committed
cleanup
1 parent 427aac3 commit ed5de7d

File tree

1 file changed

+9
-29
lines changed

1 file changed

+9
-29
lines changed

runtests.py

Lines changed: 9 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -211,11 +211,10 @@ def test_path(*names: str):
211211
'testtypegen',
212212
'testparse',
213213
'testsemanal',
214+
'testpythoneval',
215+
'testcmdline'
214216
)
215217

216-
PYEVAL_FILES = test_path('testpythoneval')
217-
CMD_FILES = test_path('testcmdline')
218-
219218
MYUNIT_FILES = test_path(
220219
'teststubgen', # contains data-driven suite
221220

@@ -229,36 +228,19 @@ def test_path(*names: str):
229228
'testtypes'
230229
)
231230

231+
for f in find_files('mypy', prefix='test', suffix='.py'):
232+
assert f in PYTEST_FILES + MYUNIT_FILES, f
232233

233-
def add_pytest(driver: Driver) -> None:
234-
driver.add_pytest('pytest', PYEVAL_FILES + CMD_FILES + PYTEST_FILES)
235-
236-
237-
def add_pythoneval(driver: Driver) -> None:
238-
pass
239-
# driver.add_pytest('eval', PYEVAL_FILES)
240234

241-
242-
def add_cmdline(driver: Driver) -> None:
243-
pass
244-
# driver.add_pytest('cmd', CMD_FILES)
235+
def add_pytest(driver: Driver) -> None:
236+
driver.add_pytest('pytest', PYTEST_FILES)
245237

246238

247239
def add_myunit(driver: Driver) -> None:
248-
for f in find_files('mypy', prefix='test', suffix='.py'):
240+
for f in MYUNIT_FILES:
249241
mod = file_to_module(f)
250-
if mod in ('mypy.test.testpythoneval', 'mypy.test.testcmdline'):
251-
# Run Python evaluation integration tests and command-line
252-
# parsing tests separately since they are much slower than
253-
# proper unit tests.
254-
pass
255-
elif f in PYTEST_FILES:
256-
# This module has been converted to pytest; don't try to use myunit.
257-
pass
258-
else:
259-
assert f in MYUNIT_FILES, f
260-
driver.add_python_mod('unit-test %s' % mod, 'mypy.myunit', '-m', mod,
261-
*driver.arglist, coverage=True)
242+
driver.add_python_mod('unit-test %s' % mod, 'mypy.myunit', '-m', mod,
243+
*driver.arglist, coverage=True)
262244

263245

264246
def add_stubs(driver: Driver) -> None:
@@ -432,8 +414,6 @@ def main() -> None:
432414

433415
driver.add_flake8()
434416
add_pytest(driver)
435-
add_pythoneval(driver)
436-
add_cmdline(driver)
437417
add_basic(driver)
438418
add_selftypecheck(driver)
439419
add_myunit(driver)

0 commit comments

Comments
 (0)