コード例 #1
0
    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))
コード例 #2
0
    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))
コード例 #3
0
    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)))
コード例 #4
0
    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))
コード例 #5
0
    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))