-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove any control characters in response #54
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Didn't look at the test failures as I'm on a phone.
@jodal I made the character mapping a constant at the top of network.py. I am still not sure what the best way is to deal with those test errors. |
You'll need to rebase your branch on top of master. Also I took a look at the test failure last night and am genuinely bamboozled 😲 |
I think we need to replace |
1cd9052
to
191ff7f
Compare
I updated the tests using |
I think this should fix #43 and #7.
I couldn't find a good method to escape the control characters while retaining all other special utf-8 characters, but escaping is more prone to errors anyway as different programs interpret escape sequences differently.
The characters are removed from the lines just before being joined, encoded and send.
Currently 3 tests are failing, which seems to be caused by a mock variable not behaving the same as it's real counterpart. I am not that experienced with unittest.mock so some advice there is welcome.
I also still have to write an appropriate unit test.