def test_invalid_upgrade_strategy_causes_error(script):
 result = script.pip_install_local('--upgrade', '--upgrade-strategy=bazinga', 'simple', expect_error=True)
 assert result.returncode
 assert ('invalid choice' in result.stderr)

def test_invalid_upgrade_strategy_causes_error ( script ) : result = script . pip_install_local ( '--upgrade' , '--upgrade-strategy=bazinga' , 'simple' , expect_error = True ) assert result . returncode assert ( 'invalid choice' in result . stderr )
it errors out when the upgrade-strategy is an invalid/unrecognised one .