Closed banesullivan closed 5 years ago
One test should assure html and plain versions have the same info.
from bs4 import BeautifulSoup
out = scooby.Report()
text_html = BeautifulSoup(out._repr_html_()).get_text()
text_plain = out.__repr__()
text_plain = " ".join(re.findall("[a-zA-Z1-9]+", text_plain))
text_html = " ".join(re.findall("[a-zA-Z1-9]+", text_html))
# Plain text currently starts with `Date :`;
# we should remove that, or add it to the html version too.
assert text_html == text_plain[5:]
And we should use the two packages
no_version
# dummy package on PyPi without version numberdoes_not_exist
# does not existto check these cases
Added those tests in a new pytest suite
We need real tests and we need to report code coverage. The current tests are minimal at best.