def test_utf8_with_ascii_only_constructor(self): """ Check that the single argument constructor of UnitLabel sets an appropriate UTF-8 string when a non-ascii string is passed. """ microseconds = u"\u00B5s" label = UnitLabel(microseconds) self.assertEqual(microseconds, label.utf8())
def test_UnitLabel_can_be_built_simple_string_and_unicode_object(self): label = UnitLabel("MyLabel", u"\u03bcs","\mu s") self.assertEquals("MyLabel", label.ascii()) self.assertEquals(u"\u03bcs", label.utf8()) self.assertEquals("\mu s", label.latex())