File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 55import platform
66import queue
77import sys
8+ import warnings
89import threading
910from random import random
1011from time import sleep
1112from urllib .parse import quote_plus
1213
13- import pandas as pd
14- import pymongo
14+ try :
15+ import pandas as pd
16+ except ImportError :
17+ pd = None
18+ warnings .warn (
19+ "pandas is not installed; tests requiring pandas will fail!" )
20+
21+ try :
22+ import pymongo
23+ from pymongo .errors import OperationFailure
24+ from pymongo .mongo_client import MongoClient
25+ from pymongo_inmemory import MongoClient as InMemoryMongoClient
26+ except ImportError :
27+ pymongo = None
28+ MongoClient = None
29+ InMemoryMongoClient = None
30+ OperationFailure = None
31+ warnings .warn (
32+ "pymongo is not installed; tests requiring pymongo will fail!"
33+ )
1534import pytest
1635from birch import Birch # type: ignore[import-not-found]
17- from pymongo .errors import OperationFailure
18- from pymongo .mongo_client import MongoClient
19- from pymongo_inmemory import MongoClient as InMemoryMongoClient
2036
2137from cachier import cachier
2238from cachier .config import CacheEntry
You can’t perform that action at this time.
0 commit comments