python tests: fix locale issues#1732
python tests: fix locale issues#1732bluca wants to merge 1 commit intorpm-software-management:dnf-4-masterfrom
Conversation
It has been observed that manipulating locales in Debian
environment, tests are failing.
======================================================================
ERROR: test_custom_querying (tests.test_reldep.Reldep)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/tmp/reprotest.wOQ8sL/build-experiment-1/build-experiment-1/python/hawkey/tests/tests/test_reldep.py", line 78, in test_custom_querying
reldep = hawkey.Reldep(self.sack, u"\u0159 >= 3")
_hawkey.ValueException: Wrong reldep format: \u0159 >= 3
|
The tested code I cannot reproduce the failure whatever locale I use in Fedora 44. What locale do you have the problem with? What Debian system is it? Why does your fix set 3 different variables to two different locales? The reported error message looks like an exception from Dependency::getReldepId() in libdnf/repo/solvable/Dependency.cpp. Could you debug what actually happens? Does your Python supports Unicode strings properly? The test was explicitly added to test handling Unicode strings passed from Python to (see commit 176baea), later changed by commit 27237a1. |
It has been observed that manipulating locales in Debian environment, tests are failing.