Esempio n. 1
0
def testTagPlayCount():
    tag = Tag()
    assert (tag.play_count is None)

    tag.play_count = 0
    assert tag.play_count == 0
    tag.play_count = 1
    assert tag.play_count == 1
    tag.play_count += 1
    assert tag.play_count == 2
    tag.play_count -= 1
    assert tag.play_count == 1
    tag.play_count *= 5
    assert tag.play_count == 5

    tag.play_count = None
    assert tag.play_count is None

    try:
        tag.play_count = -1
    except ValueError:
        pass  # expected
    else:
        assert not ("Invalid play count, expected ValueError")
Esempio n. 2
0
def testTagPlayCount():
    tag = Tag()
    assert (tag.play_count is None)

    tag.play_count = 0
    assert tag.play_count == 0
    tag.play_count = 1
    assert tag.play_count == 1
    tag.play_count += 1
    assert tag.play_count == 2
    tag.play_count -= 1
    assert tag.play_count == 1
    tag.play_count *= 5
    assert tag.play_count == 5

    tag.play_count = None
    assert tag.play_count is None

    try:
        tag.play_count = -1
    except ValueError:
        pass # expected
    else:
        assert not("Invalid play count, expected ValueError")
Esempio n. 3
0
def testTagPlayCount():
    tag = Tag()
    assert_is_none(tag.play_count)

    tag.play_count = 0
    assert_equal(tag.play_count, 0)
    tag.play_count = 1
    assert_equal(tag.play_count, 1)
    tag.play_count += 1
    assert_equal(tag.play_count, 2)
    tag.play_count -= 1
    assert_equal(tag.play_count, 1)
    tag.play_count *= 5
    assert_equal(tag.play_count, 5)

    tag.play_count = None
    assert_equal(tag.play_count, None)

    try:
        tag.play_count = -1
    except ValueError:
        pass  # expected
    else:
        assert_false("Invalid play count, expected ValueError")
Esempio n. 4
0
t.original_release_date = "1994-04-07"
t.release_date = "1994-04-07"
t.encoding_date = "2002-03"
t.recording_date = 1996
t.tagging_date = "2012-2-5"

t.comments.set(u"Gritty, yo!")
t.comments.set(u"Brownsville, Brooklyn", u"Origin")

t.user_text_frames.set(u"****", u"Rating")
t.artist_url = b"http://allmusic.com/artist/mop-p194909"
t.user_url_frames.set(b"http://eyed3.nicfit.net/")

t.bpm = 187
t.play_count = 125
t.unique_file_ids.set(b"43e888e067ea107f964916af6259cbe7", "md5sum")
t.cd_id = b"\x3c\x33\x4d\x41\x43\x59\x3c\x33"
t.privates.set("Secrets", "Billy Danzenie")
t.terms_of_use = u"Blunted"
t.lyrics.set(u"""
[ Billy Danzenie ]
How about some hardcore?
(Yeah, we like it raw!)  (4x)
How about some hardcore?

[ VERSE 1: Billy Danzenie ]
(Yeah, we like it raw in the streets)
For the fellas on the corner posted up 20 deep
With your ifth on your hip, ready to flip
Whenever you empty your clip, dip, trip your sidekick
t.original_release_date = "1994-04-07"
t.release_date = "1994-04-07"
t.encoding_date = "2002-03"
t.recording_date = 1996
t.tagging_date = "2012-2-5"

t.comments.set(u"Gritty, yo!")
t.comments.set(u"Brownsville, Brooklyn", u"Origin")

t.user_text_frames.set(u"****", u"Rating")
t.artist_url = b"http://allmusic.com/artist/mop-p194909"
t.user_url_frames.set(b"http://eyed3.nicfit.net/")

t.bpm = 187
t.play_count = 125
t.unique_file_ids.set(b"43e888e067ea107f964916af6259cbe7", "md5sum")
t.cd_id = b"\x3c\x33\x4d\x41\x43\x59\x3c\x33"
t.privates.set("Secrets", "Billy Danzenie")
t.terms_of_use = u"Blunted"
t.lyrics.set(u"""
[ Billy Danzenie ]
How about some hardcore?
(Yeah, we like it raw!)  (4x)
How about some hardcore?

[ VERSE 1: Billy Danzenie ]
(Yeah, we like it raw in the streets)
For the fellas on the corner posted up 20 deep
With your ifth on your hip, ready to flip
Whenever you empty your clip, dip, trip your sidekick