mirror of
https://github.com/kevin1024/vcrpy.git
synced 2025-12-09 01:03:24 +00:00
16 lines
395 B
Python
16 lines
395 B
Python
import sys
|
|
|
|
|
|
def test_vcr_import_deprecation(recwarn):
|
|
if "vcr" in sys.modules:
|
|
# Remove imported module entry if already loaded in another test
|
|
del sys.modules["vcr"]
|
|
|
|
import vcr # noqa: F401
|
|
|
|
if sys.version_info[0] == 2:
|
|
assert len(recwarn) == 1
|
|
assert issubclass(recwarn[0].category, DeprecationWarning)
|
|
else:
|
|
assert len(recwarn) == 0
|