aports/community/rbtools/fix-tests.patch

26 lines
960 B
Diff

currently, tests try to run the executable and check the output;
with pkg_resources being deprecated the warning is printed alongside everything,
causing the actual output to be longer than expected
diff --git a/rbtools/commands/tests/test_main.py b/rbtools/commands/tests/test_main.py
index 11b9727..6a5edb9 100644
--- a/rbtools/commands/tests/test_main.py
+++ b/rbtools/commands/tests/test_main.py
@@ -94,13 +94,13 @@ class MainCommandTests(TestCase):
"""
output = self._run_rbt(version_arg)
- self.assertEqual(
- output,
+ self.assertIn(
'RBTools %s (Python %d.%d.%d)\n'
% (get_version_string(),
sys.version_info[:3][0],
sys.version_info[:3][1],
- sys.version_info[:3][2]))
+ sys.version_info[:3][2]),
+ output)
def _run_rbt(self, *args):
"""Run rbt with the current Python and provided arguments.