Sometimes Python needs a brief sleep(0.001) or sleep(0.01) to do certain things like SCI/UART/LIN or handle HW interrupts. Without these, Python crashes or throws in a timeout error or warning of some sort. Anywhere else where there is no need to have a sleep, there should be none.
These are connection which I align to with the other once to make sure I'm connecting ti the correct Signal/slot. It helps me to identify the problem very quick.
Some Constants are one time use and doesn't add any value to the code to collect them in one place. And also since it is the unit test class the constants have been tweaked and modified to get errors to test the code. So even if it's look like the other one it has some slight changes.