finish python bindings + tests for #1448 and #1432