[tor-dev] test_cmdline_args.py on Windows
Nick Mathewson
nickm at alum.mit.edu
Tue Jan 6 18:27:17 UTC 2015
Thanks; applied!
On Mon, Jan 5, 2015 at 1:08 PM, Justin Findlay <jfindlay at gmail.com> wrote:
> On 01/05/2015 09:26 AM, Gisle Vanem wrote:
>> Gisle Vanem wrote:
>>
>>> I only get 2 errors in that script. The others like:
>>> self.assertTrue(out_verif.endswith("Configuration was valid\n"))
>>>
>>> needs another patch which is beyond my Python knowledge.
>>
>> I think it's fine now with this change:
>>
>> @@ -57,14 +57,14 @@
>> raise UnexpectedFailure()
>> elif not result and failure:
>> raise UnexpectedSuccess()
>> - return b2s(output)
>> + return b2s(output.replace('\r\n','\n'))
>
> Or even better, try to handle line endings in a platform agnostic
> manner. Perhaps you could do instead
>
> - self.assertTrue(out_verif.endswith("Configuration was valid\n"))
> + self.assertTrue(out_verif.rstrip().endswith("Configuration was
> valid"))
>
> since there are more line endings than POSIX and windows.
>
>
> Justin
> _______________________________________________
> tor-dev mailing list
> tor-dev at lists.torproject.org
> https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-dev
More information about the tor-dev
mailing list