1
0
zrcadlo https://github.com/arsenetar/dupeguru.git synchronizováno 2026-03-28 09:31:39 +00:00

Don't consider results as modified if they're empty.

Tento commit je obsažen v:
Virgil Dupras
2011-01-14 15:12:02 +01:00
rodič 19b40d45c0
revize c9fd1b1a17
2 změnil soubory, kde provedl 6 přidání a 1 odebrání

Zobrazit soubor

@@ -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:

Zobrazit soubor

@@ -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):