When writing unit tests, I want to reduce the cognitive load of the reader as much as possible. One thing I've noticed that bothers me is that the variable names of the thing that is being tested are often varying quite a bit in my and my teams code. The variable is often named similar to the component in question. As an example
class Car: def get_tires(): return 4 class TestCar: def test_get_tires(): car = Car() assert car.get_tires() == 4
this is totally OK when talking about small and clearly readable tests. But when moving to large test suits, I was wondering if it's a good idea to name the object being tested uniformly the same. So:
class TestCar: def test_get_tires(): testee = Car() assert testee.get_tires() == 4
However, I've not found such a pattern being used very much on SO and it's sibling pages like SWE. What are the pros and cons of moving to such a convention?