changeset 494:2537fe95d771

tests: Fix the Mustache tests on Windows. I'm frankly speechless here -- as much by this bug as by my fix.
author Ludovic Chabant <ludovic@chabant.com>
date Thu, 23 Jul 2015 22:09:00 -0700
parents 95b77239c3b7
children 4284c673bb91
files tests/test_templating_pystacheengine.py
diffstat 1 files changed, 4 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/tests/test_templating_pystacheengine.py	Thu Jul 23 22:08:21 2015 -0700
+++ b/tests/test_templating_pystacheengine.py	Thu Jul 23 22:09:00 2015 -0700
@@ -49,6 +49,8 @@
         route = app.getRoute('pages', None)
         route_metadata = {'slug': 'foo'}
         output = render_simple_page(page, route, route_metadata)
+        # On Windows, pystache unexplicably adds `\r` to some newlines... wtf.
+        output = output.replace('\r', '')
         assert output == expected
 
 
@@ -66,5 +68,7 @@
         route = app.getRoute('pages', None)
         route_metadata = {'slug': 'foo'}
         output = render_simple_page(page, route, route_metadata)
+        # On Windows, pystache unexplicably adds `\r` to some newlines... wtf.
+        output = output.replace('\r', '')
         assert output == expected