def test_fail_fast_error_raised(self):
   options = {'fail_fast': True, 'excludes': None}
   task = DuplicateDetector(create_context(options=options), workdir=None)
   with pytest.raises(TaskError):
     task._is_conflicts(self.path_with_duplicates, binary_target=None)
 def test_duplicate_not_found(self):
   options = {'fail_fast': False, 'excludes': None}
   task = DuplicateDetector(create_context(options=options), workdir=None)
   self.assertFalse(task._is_conflicts(self.path_without_duplicates, binary_target=None))
 def test_duplicate_not_found(self):
     options = {'fail_fast': False, 'excludes': None, 'max_dups': 10}
     task = DuplicateDetector(create_context(options=options), workdir=None)
     self.assertFalse(
         task._is_conflicts(self.path_without_duplicates,
                            binary_target=None))
 def test_fail_fast_error_raised(self):
     options = {'fail_fast': True, 'excludes': None, 'max_dups': 10}
     task = DuplicateDetector(create_context(options=options), workdir=None)
     with self.assertRaises(TaskError):
         task._is_conflicts(self.path_with_duplicates, binary_target=None)
 def test_duplicate_found(self):
   old_options = {'fail_fast': False, 'excludes': None, 'max_dups' : 10}
   task = DuplicateDetector(create_context(old_options=old_options), workdir=None)
   self.assertTrue(task._is_conflicts(self.path_with_duplicates, binary_target=None))