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 77from ._division_data import DivisionData
88
99import pytest
10+ import six
1011
1112
1213###
@@ -87,6 +88,11 @@ def test_name():
8788 assert divide .__name__ == 'divide'
8889
8990
91+ @pytest .mark .skipif (six .PY2 , reason = '__qualname__ introduced in Python 3.3' )
92+ def test_qualname ():
93+ assert divide .__qualname__ == 'divide'
94+
95+
9096def test_docstring ():
9197 assert divide .__doc__ == """A function that divides x by y."""
9298
Original file line number Diff line number Diff line change 33import math
44
55import pytest
6+ import six
67
78import variants
89from ._division_data import DivisionData
@@ -92,6 +93,12 @@ def test_name():
9293 assert dv .divide .__name__ == 'divide'
9394
9495
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+
95102def test_docstring ():
96103 dv = DivisionVariants (0 )
97104 assert dv .divide .__doc__ == """Function that divides the bound x by y."""
You can’t perform that action at this time.
0 commit comments