Skip to content

Commit 1a6ff6b

Browse files
committed
Test w3lib.util deprecation warnings
1 parent 67f535f commit 1a6ff6b

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed

tests/test_util.py

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
from unittest import TestCase
2+
3+
from pytest import deprecated_call
4+
5+
from w3lib.util import str_to_unicode, to_native_str, unicode_to_str
6+
7+
8+
class StrToUnicodeTestCase(TestCase):
9+
10+
def test_deprecation(self):
11+
with deprecated_call():
12+
str_to_unicode('')
13+
14+
15+
class ToNativeStrTestCase(TestCase):
16+
17+
def test_deprecation(self):
18+
with deprecated_call():
19+
to_native_str('')
20+
21+
22+
class UnicodeToStrTestCase(TestCase):
23+
24+
def test_deprecation(self):
25+
with deprecated_call():
26+
unicode_to_str('')

0 commit comments

Comments
 (0)