@@ -306,20 +306,19 @@ def f():
306306 assert len (cat .codes ) == 1
307307 assert cat .codes [0 ] == 0
308308
309- # Catch old style constructor useage: two arrays, codes + categories
310- # We can only catch two cases:
309+ # Catches - now disabled - for old style constructor useage:
310+ # two arrays, codes + categories
311311 # - when the first is an integer dtype and the second is not
312312 # - when the resulting codes are all -1/NaN
313- with tm .assert_produces_warning (RuntimeWarning ):
313+ with tm .assert_produces_warning (None ):
314314 c_old = Categorical ([0 , 1 , 2 , 0 , 1 , 2 ],
315315 categories = ["a" , "b" , "c" ]) # noqa
316316
317- with tm .assert_produces_warning (RuntimeWarning ):
317+ with tm .assert_produces_warning (None ):
318318 c_old = Categorical ([0 , 1 , 2 , 0 , 1 , 2 ], # noqa
319319 categories = [3 , 4 , 5 ])
320320
321- # the next one are from the old docs, but unfortunately these don't
322- # trigger :-(
321+ # the next one are from the old docs
323322 with tm .assert_produces_warning (None ):
324323 c_old2 = Categorical ([0 , 1 , 2 , 0 , 1 , 2 ], [1 , 2 , 3 ]) # noqa
325324 cat = Categorical ([1 , 2 ], categories = [1 , 2 , 3 ])
0 commit comments