summaryrefslogtreecommitdiffstats
path: root/pym/portage/tests/ebuild/test_config.py
diff options
context:
space:
mode:
Diffstat (limited to 'pym/portage/tests/ebuild/test_config.py')
-rw-r--r--pym/portage/tests/ebuild/test_config.py22
1 files changed, 22 insertions, 0 deletions
diff --git a/pym/portage/tests/ebuild/test_config.py b/pym/portage/tests/ebuild/test_config.py
index 5af8da5fb..764031707 100644
--- a/pym/portage/tests/ebuild/test_config.py
+++ b/pym/portage/tests/ebuild/test_config.py
@@ -10,6 +10,28 @@ from portage.tests.resolver.ResolverPlayground import ResolverPlayground, Resolv
class ConfigTestCase(TestCase):
+ def testClone(self):
+ """
+ Test the clone via constructor.
+ """
+
+ ebuilds = {
+ "dev-libs/A-1": { },
+ }
+
+ playground = ResolverPlayground(ebuilds=ebuilds)
+ try:
+ settings = config(clone=playground.settings)
+ result = playground.run(["=dev-libs/A-1"])
+ pkg, existing_node = result.depgraph._select_package(
+ playground.root, "=dev-libs/A-1")
+ settings.setcpv(pkg)
+
+ # clone after setcpv tests deepcopy of LazyItemsDict
+ settings2 = config(clone=settings)
+ finally:
+ playground.cleanup()
+
def testFeaturesMutation(self):
"""
Test whether mutation of config.features updates the FEATURES