I currently have like 10 tests that test whenever my Tetris piece doesn\'t move left if there is a piece in the path, or a wall. Now, I will have to test the same behaviour for
Test code is like any other code and should be maintained and refactored.
This means that if you have shared logic, extract it to its own function.
Some unit test libraries such as the xUnit family have specific test fixture, setup and teardown attributes for such shared code.
See this related question - "Why is copy paste of code dangerous?".