[BangPypers] Compare two htmls for unittest

konark modi modi.konark at gmail.com
Sat Mar 14 13:10:56 CET 2015


Can you share few examples of valid and invalid cases. ?

On Sat, Mar 14, 2015 at 1:01 PM, Amit Sethi <amit.pureenergy at gmail.com>
wrote:

> Hi All , I plan to port my html templates for mail to a new templating
> engine. So i am setting up some unit tests for that. However I am not
> sure how do i compare two html strings for equality. There might be
> places where the strings generated may be different from my test
> samples but they may render as similar. How should I tackle that. I
> tried consuming both the strings as BeautifulSoup objects and
> comparing the result. But still i get failure for htmls which I think
> are same.
>
>
> Thanks
> Amit
>
> --
> A-M-I-T S|S
> _______________________________________________
> BangPypers mailing list
> BangPypers at python.org
> https://mail.python.org/mailman/listinfo/bangpypers
>


More information about the BangPypers mailing list