From 806efdf0947c6da81c6151e8950a5e7ba8be557c Mon Sep 17 00:00:00 2001 From: Shane Fontaine Date: Fri, 28 Dec 2018 23:18:49 -0800 Subject: [PATCH] Fix precision test --- tests/test_public_client.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tests/test_public_client.py b/tests/test_public_client.py index 3d4f605..f72a681 100644 --- a/tests/test_public_client.py +++ b/tests/test_public_client.py @@ -79,8 +79,9 @@ def test_get_books(self, client, pair, precision, length): # Check Precision price = str(r[0][0]) if precision == 'P0': - digits = len(price.split(".")[1]) - assert digits == 1 + digits = len(price.split(".")) + # Will return either a whole number or a single decimal + assert (digits == 1 or digits == 2) elif precision == 'P1': assert len(price) == 4 elif precision == 'P2':