tsungchih commented on code in PR #8128: URL: https://github.com/apache/gravitino/pull/8128#discussion_r2286824711
########## clients/client-python/tests/unittests/dto/rel/test_partition_dto_serdes.py: ########## @@ -0,0 +1,356 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + +import unittest +from enum import Enum +from typing import cast +from unittest.mock import patch + +from gravitino.api.types.types import Types +from gravitino.dto.rel.expressions.json_serdes._helper.serdes_utils import ( + SerdesUtils as ExpressionSerdesUtils, +) +from gravitino.dto.rel.expressions.literal_dto import LiteralDTO +from gravitino.dto.rel.partitions.identity_partition_dto import IdentityPartitionDTO +from gravitino.dto.rel.partitions.json_serdes._helper.serdes_utils import SerdesUtils +from gravitino.dto.rel.partitions.json_serdes.partition_dto_serdes import ( + PartitionDTOSerdes, +) +from gravitino.dto.rel.partitions.list_partition_dto import ListPartitionDTO +from gravitino.dto.rel.partitions.partition_dto import PartitionDTO +from gravitino.dto.rel.partitions.range_partition_dto import RangePartitionDTO +from gravitino.exceptions.base import IllegalArgumentException + + +class MockPartitionDTOType(str, Enum): + INVALID_PARTITION_TYPE = "invalid_partition_type" + + +class TestPartitionSerdesUtils(unittest.TestCase): + @classmethod + def setUpClass(cls) -> None: + cls.literal_values = { Review Comment: @unknowntpo I'm afraid that we couldn't since this is formatted by the `Black` formatter. The formatter will correct it even if we changed the indent in the code. ```shell > Task :clients:client-python:black Executing command: 'sh -c . /path/to/projects/gravitino/.gradle/python/MacOSX/Miniforge3/bin/activate >/dev/null 2>&1 && conda activate python-3.8 >/dev/null 2>&1 && black ./gravitino ./tests ./scripts' reformatted /path/to/projects/gravitino/clients/client-python/tests/unittests/dto/rel/test_partition_dto_serdes.py All done! ✨ 🍰 ✨ 1 file reformatted, 307 files left unchanged. ``` -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@gravitino.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org