URL: https://github.com/freeipa/freeipa/pull/5520
Author: tiran
 Title: #5520: Fix pylint issues with pexpect wrapper
Action: opened

PR body:
"""
Also move dependencies to extras_require.

See: https://pagure.io/freeipa/issue/8690
See: https://github.com/freeipa/freeipa/pull/5460
Signed-off-by: Christian Heimes <chei...@redhat.com>
"""

To pull the PR as Git branch:
git remote add ghfreeipa https://github.com/freeipa/freeipa
git fetch ghfreeipa pull/5520/head:pr5520
git checkout pr5520
From 1aaaaeb06fbd4fa7096ac09c1a39bd12422be91d Mon Sep 17 00:00:00 2001
From: Christian Heimes <chei...@redhat.com>
Date: Wed, 3 Feb 2021 13:24:14 +0100
Subject: [PATCH] Fix pylint issues with pexpect wrapper

Also move dependencies to extras_require.

See: https://pagure.io/freeipa/issue/8690
Signed-off-by: Christian Heimes <chei...@redhat.com>
---
 ipatests/pytest_ipa/integration/expect.py | 34 ++++++++++++++++++++---
 ipatests/setup.py                         |  8 ++++--
 2 files changed, 36 insertions(+), 6 deletions(-)

diff --git a/ipatests/pytest_ipa/integration/expect.py b/ipatests/pytest_ipa/integration/expect.py
index 85350a10638..2960e293105 100644
--- a/ipatests/pytest_ipa/integration/expect.py
+++ b/ipatests/pytest_ipa/integration/expect.py
@@ -107,18 +107,44 @@ def send(self, s):
         logger.debug('Sending %r', s)
         return super().send(s)
 
-    def expect_list(self, pattern_list, *args, **kwargs):
+    def expect_list(
+        self,
+        pattern_list,
+        timeout=-1,
+        searchwindowsize=-1,
+        async_=False,
+        **kw
+    ):
         """Wrapper to provide logging output string and expected patterns"""
         try:
-            result = super().expect_list(pattern_list, *args, **kwargs)
+            result = super().expect_list(
+                pattern_list,
+                timeout=timeout,
+                searchwindowsize=searchwindowsize,
+                async_=async_,
+                **kw
+            )
         finally:
             self._log_output(pattern_list)
         return result
 
-    def expect_exact(self, pattern_list, *args, **kwargs):
+    def expect_exact(
+        self,
+        pattern_list,
+        timeout=-1,
+        searchwindowsize=-1,
+        async_=False,
+        **kw
+    ):
         """Wrapper to provide logging output string and expected patterns"""
         try:
-            result = super().expect_exact(pattern_list, *args, **kwargs)
+            result = super().expect_exact(
+                pattern_list,
+                timeout=timeout,
+                searchwindowsize=searchwindowsize,
+                async_=async_,
+                **kw
+            )
         finally:
             self._log_output(pattern_list)
         return result
diff --git a/ipatests/setup.py b/ipatests/setup.py
index 46fb0995801..1590baa69a9 100644
--- a/ipatests/setup.py
+++ b/ipatests/setup.py
@@ -73,10 +73,14 @@
             "pytest_multihost",
             "python-ldap",
             "six",
-            "pexpect",
         ],
         extras_require={
-            "integration": ["dbus-python", "pyyaml", "ipaserver"],
+            "integration": [
+                "dbus-python",
+                "pexpect",
+                "pyyaml",
+                "ipaserver",
+            ],
             "ipaserver": ["ipaserver"],
             "webui": ["selenium", "pyyaml", "ipaserver"],
             "xmlrpc": ["ipaserver"],
_______________________________________________
FreeIPA-devel mailing list -- freeipa-devel@lists.fedorahosted.org
To unsubscribe send an email to freeipa-devel-le...@lists.fedorahosted.org
Fedora Code of Conduct: 
https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: 
https://lists.fedorahosted.org/archives/list/freeipa-devel@lists.fedorahosted.org

Reply via email to