File tree 2 files changed +6
-5
lines changed
2 files changed +6
-5
lines changed Original file line number Diff line number Diff line change 3
3
import numpy as np
4
4
import pytest
5
5
6
+ import pandas .util ._test_decorators as td
7
+
6
8
import pandas as pd
7
9
import pandas ._testing as tm
8
10
@@ -50,11 +52,9 @@ def test_convert_empty_categorical_to_pyarrow(self):
50
52
assert converted .A .dtype == "category" , "Dtype in column A is not 'category'"
51
53
assert converted .B .dtype == "category" , "Dtype in column B is not 'category'"
52
54
assert converted .A .cat .categories .empty , "Categories in column A are not empty"
53
- assert converted .B .cat .categories .__contains__ (
54
- "B1"
55
- ) and converted .B .cat .categories .__contains__ (
56
- "B2"
57
- ), "Categories in column B doesn't contain adequate categories"
55
+ assert converted .B .cat .categories .isin (
56
+ ["B1" , "B2" ]
57
+ ).all (), "Categories in column B doesn't contain adequate categories"
58
58
59
59
def test_convert_dtypes_retain_column_names (self ):
60
60
# GH#41435
Original file line number Diff line number Diff line change 4
4
import pytest
5
5
6
6
from pandas ._libs import lib
7
+ import pandas .util ._test_decorators as td
7
8
8
9
import pandas as pd
9
10
import pandas ._testing as tm
You can’t perform that action at this time.
0 commit comments