def testTagPublisher(): t = Tag() assert_is_none(t.publisher) try: t.publisher = "not unicode" except TypeError: pass #expected else: assert_false("Expected TypeError when setting non-unicode publisher") t.publisher = u"Dischord" assert_equal(t.publisher, u"Dischord") t.publisher = u"Infinity Cat" assert_equal(t.publisher, u"Infinity Cat") t.publisher = None assert_equal(t.publisher, None)
def testTagPublisher(): t = Tag() assert (t.publisher is None) try: t.publisher = b"not unicode" except TypeError: pass #expected else: assert not ("Expected TypeError when setting non-unicode publisher") t.publisher = u"Dischord" assert t.publisher == u"Dischord" t.publisher = u"Infinity Cat" assert t.publisher == u"Infinity Cat" t.publisher = None assert t.publisher is None
def testTagPublisher(): t = Tag() assert (t.publisher is None) try: t.publisher = b"not unicode" except TypeError: pass #expected else: assert not("Expected TypeError when setting non-unicode publisher") t.publisher = "Dischord" assert t.publisher == "Dischord" t.publisher = "Infinity Cat" assert t.publisher == "Infinity Cat" t.publisher = None assert t.publisher is None