Constraints doctests and unittest