File tree Expand file tree Collapse file tree 2 files changed +13
-0
lines changed Expand file tree Collapse file tree 2 files changed +13
-0
lines changed Original file line number Diff line number Diff line change 7
7
from ._division_data import DivisionData
8
8
9
9
import pytest
10
+ import six
10
11
11
12
12
13
###
@@ -87,6 +88,11 @@ def test_name():
87
88
assert divide .__name__ == 'divide'
88
89
89
90
91
+ @pytest .mark .skipif (six .PY2 , reason = '__qualname__ introduced in Python 3.3' )
92
+ def test_qualname ():
93
+ assert divide .__qualname__ == 'divide'
94
+
95
+
90
96
def test_docstring ():
91
97
assert divide .__doc__ == """A function that divides x by y."""
92
98
Original file line number Diff line number Diff line change 3
3
import math
4
4
5
5
import pytest
6
+ import six
6
7
7
8
import variants
8
9
from ._division_data import DivisionData
@@ -92,6 +93,12 @@ def test_name():
92
93
assert dv .divide .__name__ == 'divide'
93
94
94
95
96
+ @pytest .mark .skipif (six .PY2 , reason = '__qualname__ introduced in Python 3.3' )
97
+ def test_qualname ():
98
+ dv = DivisionVariants (0 )
99
+ assert dv .divide .__qualname__ == 'DivisionVariants.divide'
100
+
101
+
95
102
def test_docstring ():
96
103
dv = DivisionVariants (0 )
97
104
assert dv .divide .__doc__ == """Function that divides the bound x by y."""
You can’t perform that action at this time.
0 commit comments