summaryrefslogtreecommitdiff
path: root/src/tests/test.py
diff options
context:
space:
mode:
authorMichele Simionato <michele.simionato@gmail.com>2015-07-28 05:33:20 +0200
committerMichele Simionato <michele.simionato@gmail.com>2015-07-28 05:33:20 +0200
commit0726464b1259505f532f2e8ffe38785600520603 (patch)
tree782fe29bafebcf47c559e72bcb89fb6384646e0c /src/tests/test.py
parentdbde4e468d931401cce0b359088b5cf8f840539a (diff)
downloadpython-decorator-git-0726464b1259505f532f2e8ffe38785600520603.tar.gz
Fixed bug with __qualname__
Diffstat (limited to 'src/tests/test.py')
-rw-r--r--src/tests/test.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/tests/test.py b/src/tests/test.py
index 951958c..9428fa9 100644
--- a/src/tests/test.py
+++ b/src/tests/test.py
@@ -40,6 +40,13 @@ class DocumentationTestCase(unittest.TestCase):
class ExtraTestCase(unittest.TestCase):
+ def test_qualname(self):
+ if sys.version >= '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)