Ejemplo n.º 1
0
    def test_copy(self):
        schema = TableSchema(["a", "b", "c"],
                             [DataTypes.INT(), DataTypes.BIGINT(), DataTypes.STRING()])

        copied_schema = schema.copy()

        self.assertEqual(schema, copied_schema)
        copied_schema._j_table_schema = None
        self.assertNotEqual(schema, copied_schema)
Ejemplo n.º 2
0
    def test_copy(self):
        schema = TableSchema(
            ["a", "b", "c"],
            [DataTypes.INT(),
             DataTypes.BIGINT(),
             DataTypes.STRING()])

        copied_schema = schema.copy()

        assert schema == copied_schema
        copied_schema._j_table_schema = None
        assert schema != copied_schema