Use deepcopy for LicenseManger, since I remove clone support from the v2.2_rc69
authorZac Medico <zmedico@gentoo.org>
Tue, 24 Aug 2010 18:42:59 +0000 (11:42 -0700)
committerZac Medico <zmedico@gentoo.org>
Tue, 24 Aug 2010 18:42:59 +0000 (11:42 -0700)
constructor.

pym/portage/tests/ebuild/test_config.py

index ef4b585a364631ca7be853d453fa1f7daed5e919..6b655daf0fc2f66d7ce8ece4e286eab45e981996 100644 (file)
@@ -1,6 +1,8 @@
 # Copyright 2010 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 
+import copy
+
 import portage
 from portage import os
 from portage.dep import ExtendedAtomDict
@@ -62,7 +64,7 @@ class ConfigTestCase(TestCase):
 
                        lic_man.parse_license_groups(license_group_locations)
                        lic_man.read_config_files(pkg_license)
-                       lic_man_backup = LicenseManager(clone=lic_man)
+                       lic_man_backup = copy.deepcopy(lic_man)
 
                        self.assertEqual(lic_man._accept_license_str, None)
                        self.assertEqual(lic_man._accept_license_str, lic_man_backup._accept_license_str)