You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was revisiting table/tests.py and noticed it was in bad need of work:
It was using Python 2
It wasn't using f-strings
I put in a bit of work and got rid of syntax errors (66d2dda) but it's claiming there are failures:
$ table/test.py
Testing ls
2023-09-23 10:09:47,520 CRITICAL /ExtraVolume/repos/toys/test/table/test.py:29 xml -> xml mismatch
$
I took a look and I think it's working correctly:
$ diff <(table -i fixed -o xml < table/ls/original.txt | html) <(table -i fixed -o xml < table/ls/original.txt | table -i xml -o xml | html)
$ table -i fixed -o xml < table/ls/original.txt | html | head
<table>
<row>
<col00000000>perms
</col00000000>
<col00000001>l
</col00000001>
<col00000002>user
</col00000002>
<col00000003>group
</col00000003>
$
However the expected output is different:
$ html < table/ls/xml/xml/noheadings.expected | head
<table>
<row>
<col00000005>datetime
</col00000005>
<col00000004>size
</col00000004>
<col00000006>name
</col00000006>
<col00000001>l
</col00000001>
The columns are clearly in a different order... it shouldn't make a difference in the XML but it's throwing the test off. I actually prefer the new behavior so the expected output file needs to be updated. I know I periodically add features and tweaks to table.py - I even added something to not sort dictionary keys but it shouldn't have changed this (famous last words!).
The text was updated successfully, but these errors were encountered:
I wonder if I need to regenerate all the test data. I could write a script to do that! I must have had a script to do it originally. I don't think I saved it, however.
I was revisiting
table/tests.py
and noticed it was in bad need of work:I put in a bit of work and got rid of syntax errors (66d2dda) but it's claiming there are failures:
I took a look and I think it's working correctly:
However the expected output is different:
The columns are clearly in a different order... it shouldn't make a difference in the XML but it's throwing the test off. I actually prefer the new behavior so the expected output file needs to be updated. I know I periodically add features and tweaks to
table.py
- I even added something to not sort dictionary keys but it shouldn't have changed this (famous last words!).The text was updated successfully, but these errors were encountered: