From 48fb6d2c87aee50eb81a1678a33cecd89a4ea3d6 Mon Sep 17 00:00:00 2001 From: Christian Heimes 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 Reviewed-By: Stanislav Laznicka --- 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 9d59ca3bd..6f716b7a1 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()]))