test: fix operator precedence in manifest v2 assertions (#3612) Six assertions in test_write_manifest and test_write_manifest_list used the form `assert x == a if format_version == 1 else b`. Because a conditional expression binds looser than `==`, Python parses this as `assert (x == a) if (format_version == 1) else b`, so for the format_version == 2 parametrization the whole statement collapses to `assert b`, where b is a truthy constant (3, or ManifestContent.DELETES). The v2 branch therefore always passed and never compared the actual value read back from the manifest. Wrap the right-hand side in parentheses so the conditional expression is the comparison target. This restores verification of the v2 sequence_number, content, min_sequence_number, and file_sequence_number on the manifest read/round-trip path. Test-only change; all parametrized cases (v1 and v2) pass. Signed-off-by: Anas Khan <83116240+anxkhn@users.noreply.github.com>
PyIceberg is a Python library for programmatic access to Iceberg table metadata as well as to table data in Iceberg format. It is a Python implementation of the Iceberg table spec.
The documentation is available at https://py.iceberg.apache.org/.