Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test failing #1

Open
onassar opened this issue Dec 3, 2012 · 4 comments
Open

test failing #1

onassar opened this issue Dec 3, 2012 · 4 comments

Comments

@onassar
Copy link

onassar commented Dec 3, 2012

Hey there. I ran ./htmldiff test and got the following:
http://cl.ly/image/2g0W3Y2c3S19

Do you think these tests failing could be related to my python version (2.7.3)?

@onassar
Copy link
Author

onassar commented Jan 15, 2013

ping?

@edsu
Copy link

edsu commented Mar 30, 2014

Tests failing are the result of the changes that have happened since the original was updated. Those tests pass with python 2.7.5.

You can roll back your repo and see this if you want:

git checkout 545ef97bfb00602acb8d60c0466b7e5e7283ee7d
./htmldiff test

the second commit a18f852 is when tests started to fail:

git checkout a18f852427cd538375ef7063c0d29671557e387a
./htmldiff test
**********************************************************************
File "./htmldiff", line 168, in __main__.htmldiff
Failed example:
    htmldiff('test1', 'test2')
Expected:
    '<span class="delete">test1 </span> <span class="insert">test2 </span> '
Got:
    '<span class="delete">test1</span><span class="insert">test2</span>'
**********************************************************************
File "./htmldiff", line 170, in __main__.htmldiff
Failed example:
    htmldiff('test1', 'test1')
Expected:
    'test1 '
Got:
    'test1'
**********************************************************************
File "./htmldiff", line 172, in __main__.htmldiff
Failed example:
    htmldiff('<b>test1</b>', '<i>test1</i>')
Expected:
    '<span class="tagDelete">delete: <tt>&lt;b&gt;</tt></span> <span class="tagInsert">insert: <tt>&lt;i&gt;</tt></span> <i> test1 <span class="tagDelete">delete: <tt>&lt;/b&gt;</tt></span> <span class="tagInsert">insert: <tt>&lt;/i&gt;</tt></span> </i> '
Got:
    '<i>test1</i>'
**********************************************************************
File "./htmldiff", line 205, in __main__.simplehtmldiff
Failed example:
    simplehtmldiff('test1', 'test2')
Expected:
    '-[test1 ]+[test2 ]'
Got:
    '-[test1]+[test2]'
**********************************************************************
File "./htmldiff", line 207, in __main__.simplehtmldiff
Failed example:
    simplehtmldiff('<b>Hello world!</b>', '<i>Hello you!</i>')
Expected:
    '-[<b>]+[<i>]<i> Hello -[world! ]-[</b>]+[you! ]+[</i>]</i> '
Got:
    '-[<b>]+[<i>]<i>Hello -[world!]-[</b>]+[you!]+[</i>]</i>'
**********************************************************************
2 items had failures:
   3 of   3 in __main__.htmldiff
   2 of   2 in __main__.simplehtmldiff
***Test Failed*** 5 failures.

@cygri
Copy link
Owner

cygri commented Mar 30, 2014

Yeah, I must admit that I completely ignored the tests when updating the code. The test failures actually all show behaviour that I would call correct, according to the whitespace and markup handling changes I made. So the tests need fixing, not the code.

@edsu
Copy link

edsu commented Mar 30, 2014

I thought it was mostly whitespace changes too, but one of the test failures gave me pause:

File "./htmldiff", line 236, in __main__.simplehtmldiff
Failed example:
    simplehtmldiff('<b>Hello world!</b>', '<i>Hello you!</i>')
Expected:
    '-[<b>]+[<i>]<i> Hello -[world! ]-[</b>]+[you! ]+[</i>]</i> '
Got:
    '<i>Hello -[world!]-[</b>]+[you!]+[</i>]</i>

Isn't there a missing <b> in the actual output as compared with the expected output?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants