Beispiel #1
0
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)
Beispiel #2
0
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
Beispiel #3
0
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