Example #1
0
    def test_index_name_a(self):

        idx1 = Index(('a', 'b', 'c', 'd'), name='foo')
        self.assertEqual(idx1.name, 'foo')

        idx2 = idx1.rename('bar')
        self.assertEqual(idx2.name, 'bar')
Example #2
0
 def test_index_rename_b(self) -> None:
     a = Index([1], name='foo')
     self.assertEqual(a.name, 'foo')
     b = a.rename(None)
     self.assertEqual(b.name, None)