@@ -306,20 +306,19 @@ def f():
306
306
assert len (cat .codes ) == 1
307
307
assert cat .codes [0 ] == 0
308
308
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
311
311
# - when the first is an integer dtype and the second is not
312
312
# - when the resulting codes are all -1/NaN
313
- with tm .assert_produces_warning (RuntimeWarning ):
313
+ with tm .assert_produces_warning (None ):
314
314
c_old = Categorical ([0 , 1 , 2 , 0 , 1 , 2 ],
315
315
categories = ["a" , "b" , "c" ]) # noqa
316
316
317
- with tm .assert_produces_warning (RuntimeWarning ):
317
+ with tm .assert_produces_warning (None ):
318
318
c_old = Categorical ([0 , 1 , 2 , 0 , 1 , 2 ], # noqa
319
319
categories = [3 , 4 , 5 ])
320
320
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
323
322
with tm .assert_produces_warning (None ):
324
323
c_old2 = Categorical ([0 , 1 , 2 , 0 , 1 , 2 ], [1 , 2 , 3 ]) # noqa
325
324
cat = Categorical ([1 , 2 ], categories = [1 , 2 , 3 ])
0 commit comments