From: Michael Orlitzky Date: Tue, 11 Oct 2016 14:49:15 +0000 (-0400) Subject: Set ABS_TOL to 1e-6 to fix solution comparisons in the test suite. X-Git-Tag: 0.1.0~161 X-Git-Url: https://gitweb.michael.orlitzky.com/?a=commitdiff_plain;h=b176f008ba7fee7a41fb1f3645dbf9c526e86cbe;p=dunshire.git Set ABS_TOL to 1e-6 to fix solution comparisons in the test suite. --- diff --git a/TODO b/TODO index 30354e4..76c4358 100644 --- a/TODO +++ b/TODO @@ -21,7 +21,4 @@ 9. We only need to include the API docs for dunshire.games in the "user manual;" everything else can go in an appendix. -10. The ice cream cone tests sometimes fail. It can happen that we get - an "unknown" back from CVXOPT, or simply that we don't get the - expected answer in self.assertTrue(abs(first - second) < - options.ABS_TOL). +10. The ice cream cone tests sometimes fail with "unknown" solution. diff --git a/src/dunshire/options.py b/src/dunshire/options.py index 27752e7..c6e5c4c 100644 --- a/src/dunshire/options.py +++ b/src/dunshire/options.py @@ -5,10 +5,11 @@ change them. But this makes the user interface real simple. """ -ABS_TOL = 1e-7 +ABS_TOL = 1e-6 """ The absolute tolerance used in all "are these numbers equal" and "is -this number less than (or equal to) that other number" tests. +this number less than (or equal to) that other number" tests. The CVXOPT +default is ``1e-7``, and we need a little bit of padding on top of that. """