def external_static_partitions_definition_from_def( partitions_def: StaticPartitionsDefinition, ) -> ExternalStaticPartitionsDefinitionData: check.inst_param(partitions_def, "partitions_def", StaticPartitionsDefinition) return ExternalStaticPartitionsDefinitionData( partition_keys=partitions_def.get_partition_keys())
def test_static_partitions(partition_keys: List[str]): static_partitions = StaticPartitionsDefinition(partition_keys) assert [(p.name, p.value) for p in static_partitions.get_partitions() ] == [(p, p) for p in partition_keys] assert static_partitions.get_partition_keys() == partition_keys