TST: Use pytest.raises and quadratics in optimize.zeros.newton() testing
TST: Use pytest.raises and quadratics in optimize.zeros.newton() testing

Use pytest.raises() instead of numpy._assert_raises_regex()
Replace transcendental functions with polynomials when testing the number of
iterations in optimize.zeros.newton() to avoid platform-dependent exp/sin/cos.

aeklant/scipy,Eric89GXL/scipy,aarchiba/scipy,ilayn/scipy,jor-/scipy,scipy/scipy,lhilt/scipy,zerothi/scipy,gertingold/scipy,vigna/scipy,andyfaff/scipy,scipy/scipy,Stefan-Endres/scipy,aeklant/scipy,arokem/scipy,endolith/scipy,jamestwebber/scipy,perimosocordiae/scipy,aeklant/scipy,zerothi/scipy,jor-/scipy,tylerjereddy/scipy,ilayn/scipy,zerothi/scipy,rgommers/scipy,Stefan-Endres/scipy,lhilt/scipy,aarchiba/scipy,gfyoung/scipy,mdhaber/scipy,zerothi/scipy,gertingold/scipy,mdhaber/scipy,scipy/scipy,zerothi/scipy,endolith/scipy,person142/scipy,vigna/scipy,Stefan-Endres/scipy,lhilt/scipy,jor-/scipy,mdhaber/scipy,rgommers/scipy,arokem/scipy,aeklant/scipy,gfyoung/scipy,e-q/scipy,tylerjereddy/scipy,jamestwebber/scipy,jamestwebber/scipy,perimosocordiae/scipy,nmayorov/scipy,Stefan-Endres/scipy,pizzathief/scipy,andyfaff/scipy,rgommers/scipy,person142/scipy,scipy/scipy,person142/scipy,anntzer/scipy,tylerjereddy/scipy,ilayn/scipy,Eric89GXL/scipy,aarchiba/scipy,gertingold/scipy,WarrenWeckesser/scipy,jamestwebber/scipy,WarrenWeckesser/scipy,nmayorov/scipy,lhilt/scipy,vigna/scipy,mdhaber/scipy,endolith/scipy,mdhaber/scipy,jor-/scipy,zerothi/scipy,gfyoung/scipy,matthew-brett/scipy,e-q/scipy,person142/scipy,anntzer/scipy,aeklant/scipy,perimosocordiae/scipy,WarrenWeckesser/scipy,ilayn/scipy,endolith/scipy,pizzathief/scipy,perimosocordiae/scipy,endolith/scipy,lhilt/scipy,WarrenWeckesser/scipy,rgommers/scipy,rgommers/scipy,WarrenWeckesser/scipy,grlee77/scipy,andyfaff/scipy,nmayorov/scipy,Stefan-Endres/scipy,endolith/scipy,jamestwebber/scipy,WarrenWeckesser/scipy,e-q/scipy,andyfaff/scipy,nmayorov/scipy,anntzer/scipy,anntzer/scipy,tylerjereddy/scipy,grlee77/scipy,gertingold/scipy,vigna/scipy,andyfaff/scipy,matthew-brett/scipy,andyfaff/scipy,jor-/scipy,nmayorov/scipy,tylerjereddy/scipy,grlee77/scipy,anntzer/scipy,scipy/scipy,scipy/scipy,e-q/scipy,Eric89GXL/scipy,gertingold/scipy,pizzathief/scipy,perimosocordiae/scipy,person142/scipy,anntzer/scipy,arokem/scipy,matthew-brett/scipy,arokem/scipy,aarchiba/scipy,perimosocordiae/scipy,vigna/scipy,pizzathief/scipy,matthew-brett/scipy,grlee77/scipy,mdhaber/scipy,matthew-brett/scipy,ilayn/scipy,aarchiba/scipy,Stefan-Endres/scipy,Eric89GXL/scipy,arokem/scipy,e-q/scipy,pizzathief/scipy,Eric89GXL/scipy,grlee77/scipy,gfyoung/scipy,ilayn/scipy,Eric89GXL/scipy,gfyoung/scipy