Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6fcaaf3 commit 2ae0ae6Copy full SHA for 2ae0ae6
tests/utils.py
@@ -1,3 +1,4 @@
1
+import re
2
import warnings
3
from contextlib import contextmanager
4
@@ -78,3 +79,8 @@ def build_request(uri='/'):
78
79
'wsgi.multithread': False,
80
'wsgi.run_once': False,
81
})
82
+
83
84
+def clean_output(s):
85
+ '''Remove double newlines with whitespace in between and reduce the level of indentation'''
86
+ return re.sub('\n( *\n)+', '\n', s).replace(' ', ' ')
0 commit comments