예제 #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)
예제 #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
예제 #3
0
파일: test_tag.py 프로젝트: nicfit/eyed3
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