pytest-doctestplus
pytest-doctestplus copied to clipboard
Add a command-line option to ignore output lines matching a specific pattern
It would be nice to be able to specify patterns for lines to ignore - e.g. in the following case the Downloading line can be ignored:
233 >>> from astropy.coordinates import EarthLocation
234 >>> EarthLocation.of_site('Apache Point Observatory') # doctest: +REMOTE_DATA +FLOAT_CMP
Expected:
<EarthLocation (-1463969.30185172, -5166673.34223433, 3434985.71204565) m>
Got:
Downloading http://data.astropy.org/coordinates/sites.json [Done]
<EarthLocation (-1463969.30185172, -5166673.34223433, 3434985.71204565) m>
This could be added as a command-line flag to which regular expressions could be passed (maybe?)
This would be such a nice feature!
This would be great. I've been affected by exactly that example ("Downloading...").
I remember something very similar in nbval
for ignoring mpl instance hashes