Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/sphinx-doc/sphinx.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTakeshi KOMIYA <i.tkomiya@gmail.com>2020-07-11 15:59:58 +0300
committerTakeshi KOMIYA <i.tkomiya@gmail.com>2020-07-11 15:59:58 +0300
commit70d521ad9c1c066a081f81e9af618dd05d372486 (patch)
treee2b80a313b2df4e92dea2de6f06c275b9ad3a468 /sphinx/testing
parente39cb011b3a25f0677013a5a64d1c88f06a345e5 (diff)
parent1a31a7ca177b3700464430b93a863130241e984f (diff)
Merge branch '3.x'
Diffstat (limited to 'sphinx/testing')
-rw-r--r--sphinx/testing/util.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/sphinx/testing/util.py b/sphinx/testing/util.py
index 6c0e22139..e1b68234f 100644
--- a/sphinx/testing/util.py
+++ b/sphinx/testing/util.py
@@ -7,6 +7,7 @@
:copyright: Copyright 2007-2020 by the Sphinx team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
+import functools
import os
import re
import sys
@@ -186,3 +187,13 @@ def find_files(root: str, suffix: bool = None) -> Generator[str, None, None]:
def strip_escseq(text: str) -> str:
return re.sub('\x1b.*?m', '', text)
+
+
+def simple_decorator(f):
+ """
+ A simple decorator that does nothing, for tests to use.
+ """
+ @functools.wraps(f)
+ def wrapper(*args, **kwargs):
+ return f(*args, **kwargs)
+ return wrapper