Adding test for Fixes #8710
Adding test for Fixes #8710

Pull Request
https://github.com/sympy/sympy/pull/10335

Issue
https://github.com/sympy/sympy/issues/8710
hargup/sympy,kaichogami/sympy,yashsharan/sympy,postvakje/sympy,lindsayad/sympy,aktech/sympy,Shaswat27/sympy,skidzo/sympy,kaushik94/sympy,hargup/sympy,Titan-C/sympy,Shaswat27/sympy,oliverlee/sympy,sampadsaha5/sympy,sampadsaha5/sympy,Titan-C/sympy,Curious72/sympy,ChristinaZografou/sympy,postvakje/sympy,drufat/sympy,jaimahajan1997/sympy,jaimahajan1997/sympy,hargup/sympy,lindsayad/sympy,lindsayad/sympy,Arafatk/sympy,postvakje/sympy,drufat/sympy,sampadsaha5/sympy,mafiya69/sympy,oliverlee/sympy,madan96/sympy,oliverlee/sympy,Curious72/sympy,souravsingh/sympy,souravsingh/sympy,Arafatk/sympy,jaimahajan1997/sympy,aktech/sympy,aktech/sympy,madan96/sympy,drufat/sympy,skidzo/sympy,ChristinaZografou/sympy,jerli/sympy,kaushik94/sympy,Arafatk/sympy,Titan-C/sympy,ChristinaZografou/sympy,chaffra/sympy,mafiya69/sympy,kaichogami/sympy,jerli/sympy,kaushik94/sympy,Shaswat27/sympy,chaffra/sympy,madan96/sympy,skidzo/sympy,mafiya69/sympy,Curious72/sympy,rahuldan/sympy,yashsharan/sympy,rahuldan/sympy,jerli/sympy,kaichogami/sympy,souravsingh/sympy,chaffra/sympy,rahuldan/sympy,yashsharan/sympy