def test_appendable_by_index_with_already_present_column(self): index_with_already_present_column = Index([self.column_0]) index_0_1 = Index([self.column_0, self.column_1]) self.assertFalse( index_0_1.appendable_by(index_with_already_present_column))
def test_appendable_by_other_table(self): column = Column("ColZ") table = Table("TableZ") table.add_column(column) index_on_other_table = Index([column]) index_0 = Index([self.column_0]) self.assertFalse(index_0.appendable_by(index_on_other_table))
def test_appendable_by_other_type(self): index_0_1 = Index([self.column_0, self.column_1]) self.assertFalse(index_0_1.appendable_by(int(17)))
def test_appendable_by(self): index_appendable_by = Index([self.column_2]) index_0_1 = Index([self.column_0, self.column_1]) self.assertTrue(index_0_1.appendable_by(index_appendable_by))
def test_appendable_by_multi_column_index(self): multi_column_index = Index([self.column_0, self.column_1]) index_2 = Index([self.column_2]) self.assertFalse(index_2.appendable_by(multi_column_index))