On Sun, Dec 6, 2020 at 2:17 PM Brian Theado <[email protected]> wrote:

> I think the code you have for checking actual vs. expected results is
another opportunity for simplification.
...
> [for assert s1 == s2 pytest shows]...

        s1 = self.tempNode.b
        s2 = self.after_p.b
>       assert s1 == s2
E       AssertionError: assert 'first line\n...\nlast line\n' == 'first
line\n...\nlast line\n'
E         Skipping 56 identical leading characters in diff, use -v to show
E         -     line c
E         +     line cXXXXXXx
E         ?           +++++++
E           last line


> IMO, this is as good if not better than your output.

Thanks for this. I seem to remember that unittest has similar capabilities.
I went looking for them recently but didn't see them. There may also be
some python text utils somewhere that zero in on text differences.

Anyway, when I next turn my attention to unit testing I'll be sure to
remember your comment.

Edward

-- 
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/leo-editor/CAMF8tS0YqpkbUsDw%2B4Crxbh68Gu4v%2Bgq3j%2B2G_pNBx4LeuQivw%40mail.gmail.com.

Reply via email to