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
items can appear in a different order every time you use them
AFAIK css classes are also defined as unordered (see : https://css-tricks.com/the-order-of-css-classes-in-html-doesnt-matter/ )
Maybe there are other opinions here and I open to a short discussion, but I personally would expect this function to only remove the specified class and keep the order as it is.
To give you an idea where this could be relevant, I can try to explain you why this is an issue for my unit-tests.
I have written a small framework which in the end is generating some html reports to show if everything was successful or if there were any issues. To test this html generation I have unit-tests which call my framework and which compare the generated html with some expected html. In most of the cases these tests are successful, but sometimes the generated html differs in the order of classes. Always when this happens the comparison considers the two files as not equal and fails.
If you agree that this is unexpected behavior I am also open to try to fix this.
To be honest I am not yet super experienced in python, but I think with some small info on how to build and test everything I could maybe manage this ;)
BR, mezorian
The text was updated successfully, but these errors were encountered:
Hi, first of all thank you for your great tool!
I really like to have this as a python library :)
During some of my unit-tests I discovered some behavior of the removeClass() function.
While converting the result of
tag.get()
into a pythonset
atit might happen that the order of values is changed.
I think the reason for this is that regarding to
a set is a
collection which means that
AFAIK css classes are also defined as unordered (see : https://css-tricks.com/the-order-of-css-classes-in-html-doesnt-matter/ )
Maybe there are other opinions here and I open to a short discussion, but I personally would expect this function to only remove the specified class and keep the order as it is.
To give you an idea where this could be relevant, I can try to explain you why this is an issue for my unit-tests.
I have written a small framework which in the end is generating some html reports to show if everything was successful or if there were any issues. To test this html generation I have unit-tests which call my framework and which compare the generated html with some expected html. In most of the cases these tests are successful, but sometimes the generated html differs in the order of classes. Always when this happens the comparison considers the two files as not equal and fails.
If you agree that this is unexpected behavior I am also open to try to fix this.
To be honest I am not yet super experienced in python, but I think with some small info on how to build and test everything I could maybe manage this ;)
BR, mezorian
The text was updated successfully, but these errors were encountered: