mirror of
https://github.com/kevin1024/vcrpy.git
synced 2025-12-08 16:53:23 +00:00
Format with line length 110 to match flake8 make black part of linting check Update travis spec for updated black requirements Add diff output for black on failure update changelog
17 lines
396 B
Python
17 lines
396 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
|