We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8893929 commit c7616acCopy full SHA for c7616ac
1 file changed
mypy/test/testmetastore.py
@@ -4,7 +4,6 @@
4
5
import tempfile
6
import unittest
7
-from typing import NoReturn
8
from unittest.mock import patch
9
10
from mypy import build
@@ -17,12 +16,12 @@ def test_create_metastore_falls_back_to_filesystem_when_sqlite_missing(self) ->
17
16
options = Options()
18
options.sqlite_cache = True
19
20
- def missing_sqlite(db_file: str, set_journal_mode: bool) -> NoReturn:
21
- raise ModuleNotFoundError("No module named '_sqlite3'")
22
-
23
with tempfile.TemporaryDirectory() as tmpdir:
24
options.cache_dir = tmpdir
25
- with patch("mypy.metastore.connect_db", missing_sqlite):
+ with patch(
+ "mypy.build.SqliteMetadataStore",
+ side_effect=ModuleNotFoundError("No module named '_sqlite3'"),
+ ):
26
store = build.create_metastore(options, parallel_worker=False)
27
28
try:
0 commit comments