mirror of
https://github.com/arsenetar/dupeguru.git
synced 2025-03-09 21:24:36 +00:00
Don't consider results as modified if they're empty.
This commit is contained in:
parent
19b40d45c0
commit
c9fd1b1a17
@ -114,7 +114,7 @@ class Results(Markable):
|
||||
self.__group_of_duplicate[dupe] = g
|
||||
if not hasattr(dupe, 'is_ref'):
|
||||
dupe.is_ref = False
|
||||
self.is_modified = True
|
||||
self.is_modified = bool(self.__groups)
|
||||
old_filters = nonone(self.__filters, [])
|
||||
self.apply_filter(None)
|
||||
for filter_str in old_filters:
|
||||
|
@ -72,6 +72,11 @@ class TestCaseResultsEmpty:
|
||||
def test_is_modified(self):
|
||||
assert not self.results.is_modified
|
||||
|
||||
def test_is_modified_after_setting_empty_group(self):
|
||||
# Don't consider results as modified if they're empty
|
||||
self.results.groups = []
|
||||
assert not self.results.is_modified
|
||||
|
||||
|
||||
class TestCaseResultsWithSomeGroups:
|
||||
def setup_method(self, method):
|
||||
|
Loading…
x
Reference in New Issue
Block a user