def test_tab_completion(self):
        # GH 9910
        s = Series(list('abcd'))
        # Series of str values should have .str but not .dt/.cat in __dir__
        self.assertTrue('str' in dir(s))
        self.assertTrue('dt' not in dir(s))
        self.assertTrue('cat' not in dir(s))

        # similiarly for .dt
        s = Series(date_range('1/1/2015', periods=5))
        self.assertTrue('dt' in dir(s))
        self.assertTrue('str' not in dir(s))
        self.assertTrue('cat' not in dir(s))

        # similiarly for .cat, but with the twist that str and dt should be
        # there if the categories are of that type first cat and str
        s = Series(list('abbcd'), dtype="category")
        self.assertTrue('cat' in dir(s))
        self.assertTrue('str' in dir(s))  # as it is a string categorical
        self.assertTrue('dt' not in dir(s))

        # similar to cat and str
        s = Series(date_range('1/1/2015', periods=5)).astype("category")
        self.assertTrue('cat' in dir(s))
        self.assertTrue(dir(s) not in 'str')
        self.assertTrue('dt' in dir(s))  # as it is a datetime categorical
dataset/ETHPy150Open pydata/pandas/pandas/tests/series/test_misc_api.py/TestSeriesMisc.test_tab_completion/swapped operands of `not in`