Skip to content

Commit 90757f9

Browse files
authored
Specify the config file when doing a self check (!) (#5279)
Fortunately only one error crept in while we weren't doing that.
1 parent 59947f8 commit 90757f9

File tree

2 files changed

+3
-7
lines changed

2 files changed

+3
-7
lines changed

mypy/test/helpers.py

-5
Original file line numberDiff line numberDiff line change
@@ -39,11 +39,6 @@ def run_mypy(args: List[str]) -> None:
3939
pytest.fail(msg="Sample check failed", pytrace=False)
4040

4141

42-
def use_builtins_fixtures(options):
43-
root_dir = dirname(dirname(dirname(__file__)))
44-
options.path_prefix = os.path.join(root_dir, 'test-data', 'unit', 'lib-stub')
45-
46-
4742
def assert_string_arrays_equal(expected: List[str], actual: List[str],
4843
msg: str) -> None:
4944
"""Assert that two string arrays are equal.

mypy/test/testselfcheck.py

+3-2
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@
55

66
class SelfCheckSuite(Suite):
77
def test_mypy_package(self) -> None:
8-
run_mypy(['-p', 'mypy'])
8+
run_mypy(['--config-file', 'mypy_self_check.ini', '-p', 'mypy'])
99

1010
def test_testrunner(self) -> None:
11-
run_mypy(['runtests.py', 'waiter.py'])
11+
run_mypy(['--config-file', 'mypy_self_check.ini',
12+
'--no-warn-unused-configs', 'runtests.py', 'waiter.py'])

0 commit comments

Comments
 (0)