From b176f008ba7fee7a41fb1f3645dbf9c526e86cbe Mon Sep 17 00:00:00 2001 From: Michael Orlitzky Date: Tue, 11 Oct 2016 10:49:15 -0400 Subject: [PATCH] Set ABS_TOL to 1e-6 to fix solution comparisons in the test suite. --- TODO | 5 +---- src/dunshire/options.py | 5 +++-- 2 files changed, 4 insertions(+), 6 deletions(-) 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. """ -- 2.44.2