Package pango provides provides a method to test markup equality. It compares to strings that represent pango markup while ignoring differences in attribute order, escaping, etc.
AssertEqual asserts that the given strings represent equivalent pango markup, i.e. the result of their rendering will be the same.
AssertText asserts that the markup string has the expected text content. Text content ignores any tags and attributes, using only rendered text.