From 59f14749021e192fff15f42a3e4698d862dedfc5 Mon Sep 17 00:00:00 2001 From: Tomas Kopecek Date: Dec 04 2024 16:51:34 +0000 Subject: [PATCH 1/2] Enforce C locale for tox environment --- diff --git a/tox.ini b/tox.ini index 5b56a3a..430742e 100644 --- a/tox.ini +++ b/tox.ini @@ -23,6 +23,7 @@ deps = sitepackages = true setenv = COLUMNS=80 + LANG=C # Expected that python-rpm is installed on the host # If rpm's python bindings are missing, don't continue # Also, because coverage might be installed system-wide and it serves as our @@ -36,13 +37,13 @@ commands_pre = [testenv:py3] deps = -r{toxinidir}/test-requirements.txt -setenv = +setenv = {[testenv]setenv} PYTHONPATH=.:plugins/hub/.:plugins/builder/.:plugins/cli/.:cli/.:www/lib commands_pre = {[testenv]commands_pre} python -m coverage erase --rcfile .coveragerc3 -commands = +commands = python -m pytest -n auto --cov --cov-config .coveragerc3 --cov-report=html [testenv:py2] From ff36be40723fcbcdd8c377f811385fec0eabb201 Mon Sep 17 00:00:00 2001 From: Tomas Kopecek Date: Dec 05 2024 15:14:25 +0000 Subject: [PATCH 2/2] Superceded by settings in tox.ini --- diff --git a/tests/test_cli/utils.py b/tests/test_cli/utils.py index 3cf113f..efa5173 100644 --- a/tests/test_cli/utils.py +++ b/tests/test_cli/utils.py @@ -194,9 +194,6 @@ class CliTestCase(unittest.TestCase): @mock.patch('koji_cli.commands.activate_session') def assert_help(self, callableObj, message, activate_session_mock): - # optarse uses gettext directly and it is driven by LANGUAGE - # we need english to get comparable strings - os.environ['LANGUAGE'] = 'C' self.assert_system_exit( callableObj, mock.MagicMock(),