summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/tests/documentation.py12
-rw-r--r--src/tests/test.py4
2 files changed, 8 insertions, 8 deletions
diff --git a/src/tests/documentation.py b/src/tests/documentation.py
index 350f05c..81602c8 100644
--- a/src/tests/documentation.py
+++ b/src/tests/documentation.py
@@ -611,11 +611,11 @@ having to rewrite them in terms of ``decorator``. You can use a
$$decorator_apply
-``decorator_apply`` sets the attribute ``__wrapped__`` of the generated
-function to the original function, so that you can get the right
-source code. If you are using Python 3, you should also set the
-``__qualname__`` attribute to preserve the qualified name of the
-original function.
+``decorator_apply`` sets the attribute ``__wrapped__`` of the
+generated function to the original function, so that you can get the
+right source code. If you are using a Python more recent than 3.2, you
+should also set the ``__qualname__`` attribute to preserve the
+qualified name of the original function.
Notice that I am not providing this functionality in the ``decorator``
module directly since I think it is best to rewrite the decorator rather
@@ -1122,7 +1122,7 @@ Here ``f.__wrapped__`` is the original undecorated function. Such an attribute
is added to be consistent with the way ``functools.update_wrapper`` work.
Another attribute which is copied from the original function is
``__qualname__``, the qualified name. This is an attribute which is
-present only in Python 3.
+present starting from Python 3.3.
"""
import sys
diff --git a/src/tests/test.py b/src/tests/test.py
index 9428fa9..45a9b9b 100644
--- a/src/tests/test.py
+++ b/src/tests/test.py
@@ -41,12 +41,12 @@ class DocumentationTestCase(unittest.TestCase):
class ExtraTestCase(unittest.TestCase):
def test_qualname(self):
- if sys.version >= '3':
+ if sys.version >= '3.3':
self.assertEqual(doc.hello.__qualname__, 'hello')
else:
with assertRaises(AttributeError):
doc.hello.__qualname__
-
+
def test_signature(self):
if hasattr(inspect, 'signature'):
sig = inspect.signature(doc.f1)