diff --git a/py/rest/testing/test_rst.py b/py/rest/testing/test_rst.py index 0d680387b..f33d72ed4 100644 --- a/py/rest/testing/test_rst.py +++ b/py/rest/testing/test_rst.py @@ -446,8 +446,11 @@ Spam, eggs and spam. def test_nonstring_text(): expected = """\ -/foo/bar.py + """ - txt = Rest(Paragraph(Text(py.path.local('/foo/bar.py')))).text() + class FooBar(object): + def __str__(self): + return '' + txt = Rest(Paragraph(Text(FooBar()))).text() assert txt == expected