Skip to content

Commit 54ca079

Browse files
committed
FIX: Fix test
1 parent c55bfeb commit 54ca079

File tree

2 files changed

+11
-11
lines changed

2 files changed

+11
-11
lines changed

numpydoc/tests/test_docscrape.py

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -335,7 +335,8 @@ def line_by_line_compare(a, b):
335335
b = textwrap.dedent(b)
336336
a = [l.rstrip() for l in _strip_blank_lines(a).split('\n')]
337337
b = [l.rstrip() for l in _strip_blank_lines(b).split('\n')]
338-
assert all(x == y for x, y in zip(a, b))
338+
for ii, (aa, bb) in enumerate(zip(a, b)):
339+
assert aa == bb
339340

340341

341342
def test_str():
@@ -1279,33 +1280,33 @@ def test_args_and_kwargs():
12791280
"""
12801281

12811282

1282-
xref_doc_txt_expected = """
1283+
xref_doc_txt_expected = r"""
12831284
Test xref in Parameters, Other Parameters and Returns
12841285
12851286
12861287
:Parameters:
12871288
1288-
p1 : :xref_param_type:`int`
1289+
**p1** : :xref_param_type:`int`
12891290
Integer value
12901291
1291-
p2 : :xref_param_type:`float`, optional
1292+
**p2** : :xref_param_type:`float`, optional
12921293
Integer value
12931294
12941295
:Returns:
12951296
1296-
out : :xref_param_type:`array <numpy.ndarray>`
1297+
**out** : :xref_param_type:`array <numpy.ndarray>`
12971298
Numerical return value
12981299
12991300
13001301
:Other Parameters:
13011302
1302-
p3 : :xref_param_type:`list`\[:xref_param_type:`int`]
1303+
**p3** : :xref_param_type:`list`\[:xref_param_type:`int`]
13031304
List of integers
13041305
1305-
p4 : :class:`pandas.DataFrame`
1306+
**p4** : :class:`pandas.DataFrame`
13061307
A dataframe
13071308
1308-
p5 : :term:`python:sequence` of :xref_param_type:`int`
1309+
**p5** : :term:`python:sequence` of :xref_param_type:`int`
13091310
A sequence
13101311
"""
13111312

numpydoc/tests/test_xref.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
# -*- encoding:utf-8 -*-
22
from __future__ import division, absolute_import, print_function
33

4-
from nose.tools import assert_equal
54
from numpydoc.xref import make_xref_param_type
65

76
xref_aliases = {
@@ -19,7 +18,7 @@
1918
}
2019

2120
# Comes mainly from numpy
22-
data = """
21+
data = r"""
2322
(...) array_like, float, optional
2423
(...) :term:`numpy:array_like`, :xref_param_type:`float`, optional
2524
@@ -125,4 +124,4 @@ def test_make_xref_param_type():
125124
xref_aliases,
126125
xref_ignore
127126
)
128-
assert_equal(result, expected_result)
127+
assert result == expected_result

0 commit comments

Comments
 (0)