mirror of
https://github.com/arsenetar/dupeguru.git
synced 2026-01-22 14:41:39 +00:00
Added an Ignore List dialog.
This commit is contained in:
@@ -9,6 +9,7 @@
|
||||
import io
|
||||
from xml.etree import ElementTree as ET
|
||||
|
||||
from pytest import raises
|
||||
from hscommon.testutil import eq_
|
||||
|
||||
from ..ignore import *
|
||||
@@ -147,3 +148,18 @@ def test_nonzero():
|
||||
assert not il
|
||||
il.Ignore('foo','bar')
|
||||
assert il
|
||||
|
||||
def test_remove():
|
||||
il = IgnoreList()
|
||||
il.Ignore('foo', 'bar')
|
||||
il.Ignore('foo', 'baz')
|
||||
il.remove('bar', 'foo')
|
||||
eq_(len(il), 1)
|
||||
assert not il.AreIgnored('foo', 'bar')
|
||||
|
||||
def test_remove_non_existant():
|
||||
il = IgnoreList()
|
||||
il.Ignore('foo', 'bar')
|
||||
il.Ignore('foo', 'baz')
|
||||
with raises(ValueError):
|
||||
il.remove('foo', 'bleh')
|
||||
|
||||
Reference in New Issue
Block a user