add comprehensive tests for undirected partitioning