From 04e41743def09b722df93c8268da56ad6537a7f7 Mon Sep 17 00:00:00 2001 From: Simon Albinsson Date: Mon, 23 Apr 2018 20:48:26 +0000 Subject: [PATCH] Tests: Check both raw and stripped data The values in the raw-data should never be different than the coresponding fields in the data-struct. Apparently they can... This is but on one location, but this checks for that oddity. --- tests/test_sgp.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/test_sgp.py b/tests/test_sgp.py index 576abf1..f80dc65 100644 --- a/tests/test_sgp.py +++ b/tests/test_sgp.py @@ -24,7 +24,9 @@ class SimpleReadTests(unittest.TestCase): self.sgp=sgp30.sgp30.Sgp30(self.bus) def test_read(self): - self.assertEqual(self.sgp.read_measurements().data,[400,6]) + d=self.sgp.read_measurements() + self.assertEqual(d.raw,[1, 144, 76, 0, 6, 39]) + self.assertEqual(d.data,[400,6]) #No real need to do this super-carefully #or i will just be testing my own test code