This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#from reddit user /u/Grorco and thread https://www.reddit.com/r/raspberry_pi/comments/8lrgsk/raspberry_pi_pinout_dictionary/ | |
def pinoutdict(): | |
"""This returns a dictionary for Raspberry Pi 3 Model B, B+, RPI2 40Pin GPIO pinout. | |
Keys are ints of the GPIO.BOARD value, values are a list of pin properties.""" | |
pinout = {1:['3.3v'], | |
2:['5v'], | |
3:['GPIO','02','SDA1','I2C'], | |
4:['5v'], | |
5:['GPIO','03','SCL1','I2C'], | |
6:['GND'], |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
replaces about 75% of moq calls with NSubstitute equivalents (taken from the moq issue thread discussing open source funding) | |
Replace "using Moq;" with "using NSubstitute;" (non-regex) | |
Replace "new Mock<(.*?)>()" with "Substitute.For<$1>()" (Regex) | |
Replace "Mock<(.*?)>" with "$1" (Regex) | |
Replace ".Setup(x => x." with "." (non-regex) | |
Replace ").ReturnsAsync(" with ".Returns(" (non-regex) | |
Replace "It.IsAny<" with "Arg.Any<" (non-regex) | |
Replace "It.IsAny<" with "Arg.Any<" (non-regex) | |
Replace "(\w+.)Verify(x => x.(\w+)((.*?)), Times.Once())" with "await $1Received(1).$2($3)" (Regex) |