Skip to content

Commit a5834b3

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent fe8a0dd commit a5834b3

1 file changed

Lines changed: 9 additions & 3 deletions

File tree

tests/test_mongo_core.py

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
# third-party imports
1515
import pytest
1616
from birch import Birch # type: ignore[import-not-found]
17+
1718
try:
1819
import pandas as pd
1920
except (ImportError, ModuleNotFoundError):
@@ -28,27 +29,32 @@
2829
print("pymongo is not installed; tests requiring pymongo will fail!")
2930
pymongo = None
3031
OperationFailure = None
32+
3133
# define a mock MongoClient class that will raise an exception
3234
# on init, warning that pymongo is not installed
3335
class MongoClient:
3436
def __init__(self, *args, **kwargs):
3537
raise ImportError("pymongo is not installed!")
38+
39+
3640
try:
3741
from pymongo_inmemory import MongoClient as InMemoryMongoClient
3842
except (ImportError, ModuleNotFoundError):
43+
3944
class InMemoryMongoClient:
4045
def __init__(self, *args, **kwargs):
4146
raise ImportError("pymongo_inmemory is not installed!")
42-
print("pymongo_inmemory is not installed; "
43-
"in-memory MongoDB tests will fail!")
47+
48+
print(
49+
"pymongo_inmemory is not installed; in-memory MongoDB tests will fail!"
50+
)
4451

4552
# local imports
4653
from cachier import cachier
4754
from cachier.config import CacheEntry
4855
from cachier.cores.base import RecalculationNeeded
4956
from cachier.cores.mongo import _MongoCore
5057

51-
5258
# === Enables testing vs a real MongoDB instance ===
5359

5460

0 commit comments

Comments
 (0)