From bafe7349229cef43a168b6a3c1c3421e02cfd413 Mon Sep 17 00:00:00 2001 From: SandstormVR Date: Thu, 28 Feb 2019 22:29:58 +0000 Subject: [PATCH] Fixed test failing and mypy error. Appeared a new pylint error (seems to be in conflict with mypy) mypy require zope.interface to be imported but when imported it is not used and pylint throws an error. --- certbot/cli/cli_utils.py | 1 + certbot/tests/helpful_test.py | 12 ++++++------ 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/certbot/cli/cli_utils.py b/certbot/cli/cli_utils.py index 61ef172e1..b536a02f3 100644 --- a/certbot/cli/cli_utils.py +++ b/certbot/cli/cli_utils.py @@ -8,6 +8,7 @@ from certbot import constants from certbot import interfaces from certbot import util from certbot import errors +import zope.interface # pylint: disable=unused-import, no-name-in-module from acme.magic_typing import Any, Dict, Optional diff --git a/certbot/tests/helpful_test.py b/certbot/tests/helpful_test.py index c1cd298eb..917ed2aec 100644 --- a/certbot/tests/helpful_test.py +++ b/certbot/tests/helpful_test.py @@ -99,16 +99,16 @@ class TestAddGroup(unittest.TestCase): # The user request help on run. A topic that given somewhere in the # args won't be added to the groups in the parser. arg_parser = HelpfulArgumentParser(['--help', 'run'], {}) - #new_group = arg_parser.add_group("auth", - # description="description of auth") - #self.assertIs(new_group._topic, "auth") + new_group = arg_parser.add_group("auth", + description="description of auth") + self.assertIs(new_group._topic, "auth") self.assertEqual(arg_parser.groups, {}) def test_add_group_topic_requested_help(self): arg_parser = HelpfulArgumentParser(['--help', 'run'], {}) - #new_group = arg_parser.add_group("run", - # description="description of run") - #self.assertIs(new_group._topic, "run") + new_group = arg_parser.add_group("run", + description="description of run") + self.assertIs(new_group._topic, "run") self.assertTrue(arg_parser.groups["run"]) arg_parser.add_group("certonly", description="description of certonly") with self.assertRaises(KeyError):