forked from fepitre/qubes-libdnf
-
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
We observe failing python tests only in reproducible tests due to locale issue with values tested.
- Loading branch information
Showing
2 changed files
with
47 additions
and
0 deletions.
There are no files selected for viewing
46 changes: 46 additions & 0 deletions
46
debian-pkg/debian/patches/0013-python-tests-fix-locale-issues.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
From bb2cf334db621ed48adf65ebe8463b3145125b7e Mon Sep 17 00:00:00 2001 | ||
From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Pierret=20=28fepitre=29?= | ||
<[email protected]> | ||
Date: Wed, 2 Dec 2020 11:30:10 +0100 | ||
Subject: [PATCH] python tests: fix locale issues | ||
|
||
It has been observed that manipulating locales in Debian | ||
environement, 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 | ||
--- | ||
python/hawkey/tests/tests/__init__.py | 1 + | ||
python/hawkey/tests/tests/base.py | 5 +++++ | ||
2 files changed, 6 insertions(+) | ||
|
||
diff --git a/python/hawkey/tests/tests/__init__.py b/python/hawkey/tests/tests/__init__.py | ||
index e69de29b..8b137891 100644 | ||
--- a/python/hawkey/tests/tests/__init__.py | ||
+++ b/python/hawkey/tests/tests/__init__.py | ||
@@ -0,0 +1 @@ | ||
+ | ||
diff --git a/python/hawkey/tests/tests/base.py b/python/hawkey/tests/tests/base.py | ||
index 4d5937b2..e46a1d66 100644 | ||
--- a/python/hawkey/tests/tests/base.py | ||
+++ b/python/hawkey/tests/tests/base.py | ||
@@ -33,6 +33,11 @@ if cachedir is None: | ||
cachedir = tempfile.mkdtemp(dir=os.path.dirname(hawkey.test.UNITTEST_DIR), | ||
prefix='pyhawkey') | ||
|
||
+# run tests with C locales | ||
+os.environ["LC_ALL"] = "C" | ||
+os.environ["LANG"] = "C.UTF-8" | ||
+os.environ["LANGUAGE"] = "en_US:en" | ||
+ | ||
class TestCase(unittest.TestCase): | ||
repo_dir = os.path.normpath(os.path.join(__file__, "../../../../../data/tests/hawkey/")) | ||
|
||
-- | ||
2.26.2 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters