def test_change_when_newer_time_before_older_time(self, mock_mtime):
     comparator = config.MTimeComparator(['./one.file'])
     # 1 -> 2
     assert comparator.has_changed()
     # 2 -> 1 (can happen as a result of a revert)
     assert comparator.has_changed()
 def test_get_most_recent(self, mock_mtime):
     comparator = config.MTimeComparator(['./one.file', './two.file'])
     assert comparator.get_most_recent_changed() == 2
     assert mock_mtime.call_count == 4
 def test_changes(self, mock_mtime):
     comparator = config.MTimeComparator(['./one.file'])
     assert comparator.has_changed()
     assert not comparator.has_changed()
     assert comparator.has_changed()
 def test_get_most_recent_empty(self):
     comparator = config.MTimeComparator([])
     assert comparator.get_most_recent_changed() == -1