Closed jaraco closed 8 years ago
Do you know why this test doesn't fail for me? Could it be that pytest enables those features for tests that need them? I recommend against nosetests, because I've found the project to be unresponsive to tickets, so I use pytest exclusively. I find it to be better maintained and more robust. Try running the tests with "python setup.py ptr" and let me know if you still encounter the error.
Original comment by: Jason R. Coombs
python setup.py ptr
passes. I'll dig some more.
But I need to make things work without setuptools, as well as exit non-zero if there are failing tests. py.test --ignore docs
seems to do the trick.
Original comment by: Mikel Ward
I'm surprised running py.test by itself doesn't result in the same outcome as ptr
. In any case, I'm glad you found something that works.
Original comment by: Jason R. Coombs
I'd prefer not to complicate the tests to support edge cases if possible.
Original comment by: Jason R. Coombs
FTR, as expected, pytest is calling doctest with optionflags=doctest.ELLIPSIS
.
So nothing to do here.
Original comment by: Mikel Ward
Thanks for the clarification. I learned something new.
Original comment by: Jason R. Coombs
On my system, the DecodingLineBuffer doctest fails. It seems that doctest is expecting the exception output to exactly match by default.
Per a quick read of https://docs.python.org/2/library/doctest.html#what-about-exceptions, it seems like you need either +ELLIPSIS or +IGNORE_EXCEPTION_DETAIL.
The attached patch sets IGNORE_EXCEPTION_DETAIL, since it's supposedly more strict, but ELLIPSIS works too.
(The other test failure is due to me not using setuptools/pkg_resources.)