Skip to content

Commit c8dda97

Browse files
committed
Capture warning in test_sys
1 parent b72a362 commit c8dda97

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Lib/test/test_sys.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1877,7 +1877,8 @@ def test_pythontypes(self):
18771877
check = self.check_sizeof
18781878
# _ast.AST
18791879
import _ast
1880-
check(_ast.AST(), size('P'))
1880+
with self.assertWarns(DeprecationWarning):
1881+
check(_ast.AST(), size('P'))
18811882
try:
18821883
raise TypeError
18831884
except TypeError as e:

0 commit comments

Comments
 (0)