From e7693cd8e3411a9a504c0d471c3119dcc29caae9 Mon Sep 17 00:00:00 2001 From: Chenxiong Qi Date: Jul 31 2018 12:03:49 +0000 Subject: [PATCH 1/2] Fix test_retire to use unittest2 in el6 Signed-off-by: Chenxiong Qi --- diff --git a/test/test_retire.py b/test/test_retire.py index dc205cc..a967458 100644 --- a/test/test_retire.py +++ b/test/test_retire.py @@ -2,13 +2,13 @@ import os import shutil -import unittest import mock import tempfile import subprocess from six.moves import configparser from fedpkg.cli import fedpkgClient +from utils import unittest TEST_CONFIG = os.path.join(os.path.dirname(__file__), 'fedpkg-test.conf') From 25aa80abc69cec713699dd89a6eb091cbcfee52e Mon Sep 17 00:00:00 2001 From: Chenxiong Qi Date: Jul 31 2018 12:06:00 +0000 Subject: [PATCH 2/2] Do not use configparser.SafeConfigParser in tests This patch removes this deprecation warning when run tests with Python 3.7: DeprecationWarning: The SafeConfigParser class has been renamed to ConfigParser in Python 3.2. This alias will be removed in future versions. Use ConfigParser directly instead. Signed-off-by: Chenxiong Qi --- diff --git a/test/utils.py b/test/utils.py index 3f9db64..45d7c02 100644 --- a/test/utils.py +++ b/test/utils.py @@ -239,7 +239,7 @@ class CliTestCase(CommandTestCase): 'fedpkg-test.conf') def new_cli(self, name='fedpkg', cfg=None, user_cfg=None): - config = configparser.SafeConfigParser() + config = configparser.ConfigParser() if cfg: config_file = os.path.join(os.path.dirname(__file__), cfg) else: