Update Python tests to work with other locales
This fixes issues #10917 and #10924
Numeric values were beign compared to strings that did not take into account localizations. The test was modified to work regardless of localization.
There is still a known issue when working with pt_BR.UTF8. The default encoder for this localization is not UTF8 resulting in an error working with a parameter that returned the UTF character for the Greek letter mu in its units.