@@ -477,7 +477,20 @@ def test_additional_dependencies(tempdir_factory, store):
477477 config = make_config_from_repo (path )
478478 config ['hooks' ][0 ]['additional_dependencies' ] = ['pep8' ]
479479 repo = Repository .create (config , store )
480- assert repo .additional_dependencies ['python' ]['default' ] == {'pep8' }
480+ assert repo .additional_dependencies ['python' ]['default' ] == ['pep8' ]
481+
482+
483+ @pytest .mark .integration
484+ def test_additional_dependencies_duplicated (
485+ tempdir_factory , store , log_warning_mock ,
486+ ):
487+ path = make_repo (tempdir_factory , 'ruby_hooks_repo' )
488+ config = make_config_from_repo (path )
489+ config ['hooks' ][0 ]['additional_dependencies' ] = [
490+ 'thread_safe' , 'tins' , 'thread_safe' ]
491+ repo = Repository .create (config , store )
492+ assert repo .additional_dependencies ['ruby' ]['default' ] == [
493+ 'thread_safe' , 'tins' ]
481494
482495
483496@pytest .mark .integration
@@ -517,12 +530,13 @@ def test_additional_ruby_dependencies_installed(
517530): # pragma: no cover (non-windows)
518531 path = make_repo (tempdir_factory , 'ruby_hooks_repo' )
519532 config = make_config_from_repo (path )
520- config ['hooks' ][0 ]['additional_dependencies' ] = ['thread_safe' ]
533+ config ['hooks' ][0 ]['additional_dependencies' ] = ['thread_safe' , 'tins' ]
521534 repo = Repository .create (config , store )
522535 repo .require_installed ()
523536 with ruby .in_env (repo .cmd_runner , 'default' ):
524537 output = cmd_output ('gem' , 'list' , '--local' )[1 ]
525538 assert 'thread_safe' in output
539+ assert 'tins' in output
526540
527541
528542@skipif_slowtests_false
0 commit comments