def test_texsafe(): assert h.texsafe("hello") == r"hello" assert h.texsafe("a_b") == r"a\_{}b" assert h.texsafe("a < b") == r"a \textless{} b"