Environment marker support fails API tests on PyPy #50
Comments
Original comment by iElectric (Bitbucket: iElectric, GitHub: Unknown): |
Original comment by jaraco (Bitbucket: jaraco, GitHub: jaraco): It would be fine except that these tests not only test the behavior, but also document and advertise the API, on which a client should be able to rely. If the message is different on PyPy, we need to provide a less strict API (not guarantee the output, but only that an error message occurs) or update setuptools to meet the prescribed API even on PyPy. |
Original comment by iElectric (Bitbucket: iElectric, GitHub: Unknown): Do we really need to show how not to use API? And if so, we could use ellipsis to hide the output. |
Original comment by pje (Bitbucket: pje, GitHub: pje): That isn't showing how not to use the API, it's showing that the API correctly detects invalid environment markers. Part of its contract is being able to tell you whether a marker is valid. (For the parse errors provided by Python, though, it doesn't especially matter what the error output is.) |
Original comment by jaraco (Bitbucket: jaraco, GitHub: jaraco): I created one implementation that normalizes the error messages returned on the various implementations. If the error messages are unimportant, perhaps the api tests should just report/guarantee the boolean output, and add some internal unit tests to exercise other guarantees. |
Originally reported by: jaraco (Bitbucket: jaraco, GitHub: jaraco)
In this Travis-CI run, we see setuptools fails two publish API tests in the environment marker support:
and
It seems the differences in the parser yield different error messages.
Either the API expectations need to be relaxed or setuptools needs to wrap this call to translate the error messages when invoked on PyPy.
The text was updated successfully, but these errors were encountered: