From 1a250647109251fc8558c81b78b2065ad6ddba85 Mon Sep 17 00:00:00 2001 From: Simon Albinsson Date: Thu, 12 Apr 2018 21:51:11 +0000 Subject: [PATCH] Test: i2c-read now protects agains double reads --- tests/mock_smbus2.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/mock_smbus2.py b/tests/mock_smbus2.py index 744c615..db4f0ab 100644 --- a/tests/mock_smbus2.py +++ b/tests/mock_smbus2.py @@ -36,12 +36,12 @@ class MockSMBus: def _process_read(s,msg): if s.status == None: - raise AssertionError("tired to read before write") + raise AssertionError("Tried to read before write") for i in range(len(s.status)): msg.buf[i]=chr(s.status[i]) if s._break_crc and i%3 == 2: msg.buf[i]=chr(s.status[i]^42) - self.status=None + s.status=None def _process_write(s,msg):