mirror of
https://github.com/kevin1024/vcrpy.git
synced 2025-12-09 09:13:23 +00:00
Increment version to v2.1.0 and add Python2.x deprecation warning (#458)
* Increment version and add Python2.x deprecation warning Change test to actually test no warnings when on python3 flake8 compliant * fix development status classifier
This commit is contained in:
16
tests/unit/test_vcr_import.py
Normal file
16
tests/unit/test_vcr_import.py
Normal file
@@ -0,0 +1,16 @@
|
||||
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
|
||||
Reference in New Issue
Block a user