Skip to content

Commit 52f247c

Browse files
committed
make tests run under python2.7
1 parent 46036b0 commit 52f247c

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

numpydoc/tests/test_docscrape.py

+6-2
Original file line numberDiff line numberDiff line change
@@ -272,12 +272,16 @@ def dummy_func(arg):
272272
try:
273273
SphinxClassDoc(Dummy)
274274
except ValueError as e:
275-
assert_true("test_section_twice.<locals>.Dummy" in str(e))
275+
# python 3 version or python 2 version
276+
assert_true("test_section_twice.<locals>.Dummy" in str(e)
277+
or 'test_docscrape.Dummy' in str(e))
276278

277279
try:
278280
SphinxFunctionDoc(dummy_func)
279281
except ValueError as e:
280-
assert_true("test_section_twice.<locals>.dummy_func" in str(e))
282+
# python 3 version or python 2 version
283+
assert_true("test_section_twice.<locals>.dummy_func" in str(e)
284+
or 'function dummy_func' in str(e))
281285

282286

283287
def test_notes():

0 commit comments

Comments
 (0)