#NEWLINE# def test_check_targets_fails_with_duplicate_artifacts( self ) : #NEWLINE# #INDENT# bad_targets = self . _prepare_targets_with_duplicates ( ) #NEWLINE# with temporary_dir ( ) as publishdir : #NEWLINE# #INDENT# self . set_options ( dryrun = False , local = publishdir ) #NEWLINE# task = self . create_task ( self . context ( target_roots = bad_targets ) ) #NEWLINE# self . _prepare_mocks ( task ) #NEWLINE# with self . assertRaises ( JarPublish . DuplicateArtifactError ) : #NEWLINE# #INDENT# task . check_targets ( task . exported_targets ( ) )