コード例 #1
0
def test_load_and_blacklist_new_stage():
    checklist = dm.checklist.load(StringIO(
        """
    blacklist:
      stage:
        series1:
    """))
    checklist.blacklist("stage", "series2")
    assert checklist.is_blacklisted("stage", "series1"), checklist
    assert checklist.is_blacklisted("stage", "series2"), checklist
コード例 #2
0
def test_load_format_error_empty_blacklist_stage():
    checklist = dm.checklist.load(StringIO(
        """
    blacklist:
      stage:
    """))
    assert not checklist.is_blacklisted("stage", "series"), checklist
コード例 #3
0
def test_save_load_checklist():
    checklist = dm.checklist.load(StringIO())
    checklist.blacklist("stage", "series")

    stream = StringIO()
    checklist.save(stream)
    stream.seek(0)

    checklist = dm.checklist.load(stream)
    assert checklist.is_blacklisted("stage", "series"), checklist
コード例 #4
0
def test_remove_from_empty_blacklist():
    checklist = dm.checklist.load(StringIO())
    checklist.unblacklist("stage", "series")
    assert not checklist.is_blacklisted("stage", "series")
コード例 #5
0
def test_empty_checklist_blacklist_add_new_stage():
    checklist = dm.checklist.load(StringIO())
    checklist.blacklist("stage", "series")
    assert checklist.is_blacklisted("stage", "series")
コード例 #6
0
def test_empty_checklist_is_blacklisted():
    checklist = dm.checklist.load(StringIO())
    assert not checklist.is_blacklisted("stage", "series")