commit:     45bdfae8b20dc24559d325db7322576855d6a582
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Mon Feb 26 12:40:15 2018 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Mon Feb 26 22:07:36 2018 +0000
URL:        https://gitweb.gentoo.org/proj/portage.git/commit/?id=45bdfae8

test_required_use: Add tests for ?? operator

Reviewed-by: Zac Medico <zmedico <AT> gentoo.org>

 pym/portage/tests/resolver/test_required_use.py | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/pym/portage/tests/resolver/test_required_use.py 
b/pym/portage/tests/resolver/test_required_use.py
index c8810faef..d40222204 100644
--- a/pym/portage/tests/resolver/test_required_use.py
+++ b/pym/portage/tests/resolver/test_required_use.py
@@ -44,6 +44,12 @@ class RequiredUSETestCase(TestCase):
                        "dev-libs/D-3" : {"EAPI": "4", "IUSE": "+w +x y z",     
"REQUIRED_USE": "w? ( x || ( y z ) )"},
                        "dev-libs/D-4" : {"EAPI": "4", "IUSE": "+w x +y +z",    
"REQUIRED_USE": "w? ( x || ( y z ) )"},
                        "dev-libs/D-5" : {"EAPI": "4", "IUSE": "w x y z",       
"REQUIRED_USE": "w? ( x || ( y z ) )"},
+
+                       "dev-libs/E-1" : {"EAPI": "5", "IUSE": "foo bar",   
"REQUIRED_USE": "?? ( foo bar )"},
+                       "dev-libs/E-2" : {"EAPI": "5", "IUSE": "foo +bar",  
"REQUIRED_USE": "?? ( foo bar )"},
+                       "dev-libs/E-3" : {"EAPI": "5", "IUSE": "+foo bar",  
"REQUIRED_USE": "?? ( foo bar )"},
+                       "dev-libs/E-4" : {"EAPI": "5", "IUSE": "+foo +bar", 
"REQUIRED_USE": "?? ( foo bar )"},
+                       "dev-libs/E-5" : {"EAPI": "5", "IUSE": "+foo +bar", 
"REQUIRED_USE": "?? ( )"},
                        }
 
                test_cases = (
@@ -79,6 +85,12 @@ class RequiredUSETestCase(TestCase):
                        ResolverPlaygroundTestCase(["=dev-libs/D-3"],  success 
= False),
                        ResolverPlaygroundTestCase(["=dev-libs/D-4"],  success 
= False),
                        ResolverPlaygroundTestCase(["=dev-libs/D-5"],  success 
= True, mergelist=["dev-libs/D-5"]),
+
+                       ResolverPlaygroundTestCase(["=dev-libs/E-1"], success = 
True, mergelist=["dev-libs/E-1"]),
+                       ResolverPlaygroundTestCase(["=dev-libs/E-2"], success = 
True, mergelist=["dev-libs/E-2"]),
+                       ResolverPlaygroundTestCase(["=dev-libs/E-3"], success = 
True, mergelist=["dev-libs/E-3"]),
+                       ResolverPlaygroundTestCase(["=dev-libs/E-4"], success = 
False),
+                       ResolverPlaygroundTestCase(["=dev-libs/E-5"], success = 
True, mergelist=["dev-libs/E-5"]),
                        )
 
                playground = ResolverPlayground(ebuilds=ebuilds)

Reply via email to