mirror of
https://github.com/scrapy/scrapy.git
synced 2025-02-06 16:31:38 +00:00
d2bdbad8c8
* Deprecate scrapy.twisted_version * fix: typing * remove typing * raise default exception if attribute is not found * remove redudant () * add tests * rollback exception raised * add filterwarnings again * change order * lint
14 lines
408 B
Python
14 lines
408 B
Python
import warnings
|
|
|
|
|
|
def test_deprecated_twisted_version():
|
|
with warnings.catch_warnings(record=True) as warns:
|
|
from scrapy import twisted_version
|
|
|
|
assert twisted_version is not None
|
|
assert isinstance(twisted_version, tuple)
|
|
assert (
|
|
"The scrapy.twisted_version attribute is deprecated, use twisted.version instead"
|
|
in warns[0].message.args
|
|
)
|