For a python class, the __init__ method is called whenever the class is initalized (when you do new TestEmployee(100) or something) so it might make sense to rename setUp to __init__. In terms of simplifying the code, there's not much that you can do, as it's already pretty simple. Think about what you want to happen right when you make a new TestEmployee, that's what should go in your __init__ or setUp method.
For a python class, the
__init__
method is called whenever the class is initalized (when you donew TestEmployee(100)
or something) so it might make sense to renamesetUp
to__init__
.In terms of simplifying the code, there's not much that you can do, as it's already pretty simple. Think about what you want to happen right when you make a new TestEmployee, that's what should go in your
__init__
orsetUp
method.it's a test class, that doesn't apply i don't think @RoBlockHead