[#134 state:fixed] Removing all dupes from the results sets it in 'not modified' state.

This commit is contained in:
Virgil Dupras 2011-01-26 11:49:30 +01:00
parent 9d0e8d94ca
commit 21efef42f7
2 changed files with 7 additions and 1 deletions

View File

@ -272,7 +272,7 @@ class Results(Markable):
for group in affected_groups:
group.discard_matches()
self.__dupes = None
self.is_modified = True
self.is_modified = bool(self.__groups)
def save_to_xml(self, outfile):
self.apply_filter(None)

View File

@ -225,6 +225,12 @@ class TestCaseResultsWithSomeGroups:
self.results.load_from_xml(f, get_file)
assert not self.results.is_modified
def test_is_modified_after_removing_all_results(self):
# Removing all results sets the is_modified flag to false.
self.results.mark_all()
self.results.perform_on_marked(lambda x:None, True)
assert not self.results.is_modified
class TestCaseResultsWithSavedResults:
def setup_method(self, method):