pytest-reserial (pypi): Pytest fixture for recording and replaying serial port traffic.
Keywords: serial|testing|logging|mocking|patching|stubbing|record|replay