From f6fa70b8d72fc16f4234fe0770d3407aaf299cf7 Mon Sep 17 00:00:00 2001 From: brettlangdon Date: Mon, 15 Feb 2021 21:03:25 -0500 Subject: [PATCH] fix py2.7 syntax --- tests/test_audit.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/tests/test_audit.py b/tests/test_audit.py index 330107e..e65b6f4 100644 --- a/tests/test_audit.py +++ b/tests/test_audit.py @@ -23,13 +23,13 @@ else: class AuditTest(unittest.TestCase): - def _do_test(self, *args, impl=None): + def _do_test(self, *args, **kwargs): popen_kwargs = dict( stdout=subprocess.PIPE, stderr=subprocess.PIPE, ) - if impl: - popen_kwargs["env"] = dict(SYSAUDIT_IMPL=impl) + if "impl" in kwargs: + popen_kwargs["env"] = dict(SYSAUDIT_IMPL=kwargs["impl"]) if sys.version_info >= (3, 6): popen_kwargs["encoding"] = "utf-8" @@ -46,15 +46,15 @@ class AuditTest(unittest.TestCase): for impl in IMPLEMENTATIONS: return self._do_test(*args, impl=impl) - def _run_python(self, *args, impl=None): + def _run_python(self, *args, **kwargs): events = [] popen_kwargs = dict( stdout=subprocess.PIPE, stderr=subprocess.PIPE, ) - if impl: - popen_kwargs["env"] = dict(SYSAUDIT_IMPL=impl) + if "impl" in kwargs: + popen_kwargs["env"] = dict(SYSAUDIT_IMPL=kwargs["impl"]) if sys.version_info >= (3, 6): popen_kwargs["encoding"] = "utf-8"