Skip to content

Commit

Permalink
Change return code check in CTRL-C sigint test of orbit integration i…
Browse files Browse the repository at this point in the history
…nterruption, because Python 3.8 now seems to (correctly) return -2 rather than 1
  • Loading branch information
jobovy committed Mar 15, 2020
1 parent 579564e commit 35e0e5f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tests/test_orbit.py
Original file line number Diff line number Diff line change
Expand Up @@ -3910,7 +3910,7 @@ def test_orbit_c_sigint_full():

if p.poll() == 2 and WIN32: break

if p.poll() is None or p.poll() != 1:
if p.poll() is None or (p.poll() != 1 and p.poll() != -2):
if p.poll() is None: msg= -100
else: msg= p.poll()
raise AssertionError("Full orbit integration using %s should have been interrupted by SIGINT (CTRL-C), but was not because p.poll() == %i" % (integrator,msg))
Expand Down Expand Up @@ -3945,7 +3945,7 @@ def test_orbit_c_sigint_planar():

if p.poll() == 2 and WIN32: break

if p.poll() is None or p.poll() != 1:
if p.poll() is None or (p.poll() != 1 and p.poll() != -2):
if p.poll() is None: msg= -100
else: msg= p.poll()
raise AssertionError("Full orbit integration using %s should have been interrupted by SIGINT (CTRL-C), but was not because p.poll() == %i" % (integrator,msg))
Expand Down Expand Up @@ -3976,7 +3976,7 @@ def test_orbit_c_sigint_planardxdv():

if p.poll() == 2 and WIN32: break

if p.poll() is None or p.poll() != 1:
if p.poll() is None or (p.poll() != 1 and p.poll() != -2):
if p.poll() is None: msg= -100
else: msg= p.poll()
raise AssertionError("Full orbit integration using %s should have been interrupted by SIGINT (CTRL-C), but was not because p.poll() == %i" % (integrator,msg))
Expand Down

0 comments on commit 35e0e5f

Please sign in to comment.