@@ -37,7 +37,7 @@ def test_astype_conversion(self):
37
37
)
38
38
tm .assert_index_equal (result , expected )
39
39
40
- with tm .assert_produces_warning (FutureWarning , check_stacklevel = False ):
40
+ with tm .assert_produces_warning (FutureWarning ):
41
41
result = idx .astype (np .int64 )
42
42
expected = Int64Index (
43
43
[16937 ] + [- 9223372036854775808 ] * 3 , dtype = np .int64 , name = "idx"
@@ -49,15 +49,15 @@ def test_astype_conversion(self):
49
49
tm .assert_index_equal (result , expected )
50
50
51
51
idx = period_range ("1990" , "2009" , freq = "A" , name = "idx" )
52
- with tm .assert_produces_warning (FutureWarning , check_stacklevel = False ):
52
+ with tm .assert_produces_warning (FutureWarning ):
53
53
result = idx .astype ("i8" )
54
54
tm .assert_index_equal (result , Index (idx .asi8 , name = "idx" ))
55
55
tm .assert_numpy_array_equal (result .values , idx .asi8 )
56
56
57
57
def test_astype_uint (self ):
58
58
arr = period_range ("2000" , periods = 2 , name = "idx" )
59
59
expected = UInt64Index (np .array ([10957 , 10958 ], dtype = "uint64" ), name = "idx" )
60
- with tm .assert_produces_warning (FutureWarning , check_stacklevel = False ):
60
+ with tm .assert_produces_warning (FutureWarning ):
61
61
tm .assert_index_equal (arr .astype ("uint64" ), expected )
62
62
tm .assert_index_equal (arr .astype ("uint32" ), expected )
63
63
0 commit comments