def test_dmp_trunc(): assert dmp_trunc([[]], [1, 2], 2, ZZ) == [[]] assert dmp_trunc([[1, 2], [1, 4, 1], [1]], [1, 2], 1, ZZ) == [[-3], [1]]