Hi.I confirm that the huge memory allocation happens during the override_dh_auto_test target of debian/rules, not during the build itself.
This is at least double the amount of *any other* of the 33785 source packages in Debian bookworm, so yes, I think it is more than fair to call it an anomaly.
Thanks.