File tree Expand file tree Collapse file tree 2 files changed +6
-5
lines changed Expand file tree Collapse file tree 2 files changed +6
-5
lines changed Original file line number Diff line number Diff line change 33import numpy as np
44import pytest
55
6+ import pandas .util ._test_decorators as td
7+
68import pandas as pd
79import pandas ._testing as tm
810
@@ -50,11 +52,9 @@ def test_convert_empty_categorical_to_pyarrow(self):
5052 assert converted .A .dtype == "category" , "Dtype in column A is not 'category'"
5153 assert converted .B .dtype == "category" , "Dtype in column B is not 'category'"
5254 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"
5858
5959 def test_convert_dtypes_retain_column_names (self ):
6060 # GH#41435
Original file line number Diff line number Diff line change 44import pytest
55
66from pandas ._libs import lib
7+ import pandas .util ._test_decorators as td
78
89import pandas as pd
910import pandas ._testing as tm
You can’t perform that action at this time.
0 commit comments