URL: https://github.com/freeipa/freeipa/pull/1729
Author: tiran
 Title: #1729: Fix compatibility with latest pytest
Action: opened

PR body:
"""
pytest removed copy() method from its Namespace class. Use the copy
module to make a copy of early options.

Signed-off-by: Christian Heimes <[email protected]>
"""

To pull the PR as Git branch:
git remote add ghfreeipa https://github.com/freeipa/freeipa
git fetch ghfreeipa pull/1729/head:pr1729
git checkout pr1729
From bea607718a222d0950332fffb3db7dacfe6045fe Mon Sep 17 00:00:00 2001
From: Christian Heimes <[email protected]>
Date: Fri, 23 Mar 2018 10:51:12 +0100
Subject: [PATCH] Fix compatibility with latest pytest

pytest removed copy() method from its Namespace class. Use the copy
module to make a copy of early options.

Signed-off-by: Christian Heimes <[email protected]>
---
 ipatests/ipa-run-tests | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/ipatests/ipa-run-tests b/ipatests/ipa-run-tests
index 9d59ca3bd9..6f716b7a1a 100755
--- a/ipatests/ipa-run-tests
+++ b/ipatests/ipa-run-tests
@@ -28,11 +28,11 @@ so any relative paths given will be based on the ipatests module's path
 """
 
 import os
+import copy
 import sys
 
 import pytest
 
-import ipalib
 import ipatests
 
 # This is set to store --with-xunit report in an accessible place:
@@ -83,7 +83,7 @@ class ArgsManglePlugin(object):
         # are used for initial conftest.py from ipatests, which adds
         # additional arguments.
         early_config.known_args_namespace = parser.parse_known_args(
-            args, namespace=early_config.option.copy())
+            args, namespace=copy.copy(early_config.option))
 
 
 sys.exit(pytest.main(plugins=[ArgsManglePlugin()]))
_______________________________________________
FreeIPA-devel mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to