diff --git a/anndata/tests/test_base.py b/anndata/tests/test_base.py
index <HASH>..<HASH> 100644
--- a/anndata/tests/test_base.py
+++ b/anndata/tests/test_base.py
@@ -549,12 +549,12 @@ def test_1d_slice_dtypes():
     new_obs_df = pd.DataFrame(index=adata.obs_names)
     for k in obs_df.columns:
         new_obs_df[k] = adata.obs_vector(k)
-        assert new_obs_df[k].dtype is obs_df[k].dtype
+        assert new_obs_df[k].dtype == obs_df[k].dtype
     assert np.all(new_obs_df == obs_df)
     new_var_df = pd.DataFrame(index=adata.var_names)
     for k in var_df.columns:
         new_var_df[k] = adata.var_vector(k)
-        assert new_var_df[k].dtype is var_df[k].dtype
+        assert new_var_df[k].dtype == var_df[k].dtype
     assert np.all(new_var_df == var_df)
`dtype == dtype`, not `dtype is dtype`

For how pandas <I> compares categoricals.