Files
python/python爬虫/scrapy-redis-0.9.1/tests/test_utils.py
T

8 lines
213 B
Python
Raw Normal View History

2025-08-05 09:19:34 +08:00
from scrapy_redis.utils import bytes_to_str
def test_bytes_to_str():
assert bytes_to_str(b"foo") == "foo"
# This char is the same in bytes or latin1.
assert bytes_to_str(b"\xc1", "latin1") == "\xc1"