title: Windows Python application development for Raspberry Pi using the RPi package. How to substitute RPi package so app can run on windows
body: <p>I am developing a python application that is deployed to a raspberry pi. It uses the RPi package which allows the application to connect to the GPIO of the Pi.</p>
  <p>I am currently developing the application on Windows and firstly would like to be able to run the application on my windows PC but secondly when I write unit tests I would like to be able to run the tests autonomously and be able to change how the mock RPi behaves to simulate errors.</p>
  <p>What are the best practices within python to substitute a package so that it runs normally on the Pi using the real RPi packages and also automatically runs the mocked package?</p>