Open twisted-trac opened 14 years ago
Automation removed owner |
---|
@exarkun set owner to @MostAwesomeDude |
---|
The fix looks great, thanks! That reasoning about the test coverage has a flaw though. The tests will execute the line, but they'll never take the code path which leads to the TelnetError
being raised. If they did, they would have already failed under python -O
, but there isn't. So, can you add a test? Also, I wonder if raising an exception is really the sensible thing to do here. Alternatives are that we could just log a message saying the application did something ridiculous. On the other hand, it was raising an exception before, so it's fine to continue.
@MostAwesomeDude commented |
---|
I think raising the exception is the correct thing to do, yes. TelnetError seems like the right choice for this section of code, too.
I am trying to grok these tests and failing hard; I'm hard-pressed to understand the relationship between raising this error and failing those tests. I'll get it eventually; it might just be a bit. :3
twisted.conch.telnet has an assert which should probably not be an assert:
(after all, enableRemote might actually mutate something, and in this case, it looks like it does.)
Attachments:
Searchable metadata
``` trac-id__4349 4349 type__defect defect reporter__ivank ivank priority__normal normal milestone__ branch__ branch_author__ status__new new resolution__None None component__conch conch keywords__ time__1267804737000000 1267804737000000 changetime__1301352949000000 1301352949000000 version__None None owner__MostAwesomeDude MostAwesomeDude ```