Our development team uses a PEP8 linter which requires a maximum line length of 80 characters.
When I\'m writing unit tests in python, I like to have
The need for this kind of names may hint at other smells.
class ClientConnectionTest(unittest.TestCase):
def test_that_client_event_listener_receives_connection_refused_error_without_server(self):
...
ClientConnectionTest
sounds pretty broad (and not at all like a testable unit), and is likely a large class with plenty of tests inside that could be refocused. Like this:
class ClientEventListenerTest(unittest.TestCase):
def receives_connection_refused_without_server(self):
...
"Test" is not useful in the name because it's implied.
With all the code you've given me, my final advice is: refactor your test code, then revisit your problem (if it's still there).