sphinx / tests /

Diff from to

File tests/

 def gen_with_app(*args, **kwargs):
-    Make a TestApp with args and kwargs, pass it to the test and clean up
-    properly. The wrapped function is assumed to be a generator and the
-    wrapper function is itself a generator that will iterate over the
-    values of the wrapped function and yield them.
+    Decorate a test generator to pass a TestApp as the first argument to the
+    test generator when it's executed.
     def generator(func):
             contents = contents.encode('ascii')
         mode = 'w'
-    f = open(str(name), 'wb', encoding=encoding)
+    f = open(str(name), mode, encoding=encoding)