aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorAndré Erdmann <dywi@mailerd.de>2013-07-05 18:42:05 +0200
committerAndré Erdmann <dywi@mailerd.de>2013-07-05 18:42:05 +0200
commit1a6c4298b8f4ac0878fa2f51542433860c4a2bac (patch)
tree13a3e6f0a59a47e1e852d58f6376a70940f317db /tests
parentfix R-packages.eclass (thanks to heroxbd) (diff)
downloadR_overlay-1a6c4298b8f4ac0878fa2f51542433860c4a2bac.tar.gz
R_overlay-1a6c4298b8f4ac0878fa2f51542433860c4a2bac.tar.bz2
R_overlay-1a6c4298b8f4ac0878fa2f51542433860c4a2bac.zip
tests/depres: (try to) load rule files
Diffstat (limited to 'tests')
-rw-r--r--tests/depres.py13
-rw-r--r--tests/static/depres.py7
2 files changed, 20 insertions, 0 deletions
diff --git a/tests/depres.py b/tests/depres.py
index a85af56..7a0af6c 100644
--- a/tests/depres.py
+++ b/tests/depres.py
@@ -4,6 +4,8 @@
# Distributed under the terms of the GNU General Public License;
# either version 2 of the License, or (at your option) any later version.
+from __future__ import print_function
+
import random
import roverlay.interface.depres
@@ -28,6 +30,7 @@ class DepresTestCase ( tests.interface.RoverlayInterfaceTestCase ):
'sanity_checks',
'visualize',
'depres_static', 'depres_static_randomized',
+ 'load_rules',
]
DEPRES_INTERFACE = None
@@ -148,3 +151,13 @@ class DepresTestCase ( tests.interface.RoverlayInterfaceTestCase ):
DEPRES_DATA [test_data] if isinstance ( test_data, str )
else test_data
)
+ # --- end of test_depres_static_randomized (...) ---
+
+ def test_load_rules ( self ):
+ self.depres.discard_all_pools()
+ if self.CONFIG.get ( "DEPRES.simple_rules.files", None ):
+ self.depres.load_rules_from_config ( ignore_missing=True )
+ self.depres.discard_all_pools()
+ else:
+ self.skipTest ( "No rule files configured." )
+ # --- end of test_load_rules (...) ---
diff --git a/tests/static/depres.py b/tests/static/depres.py
index 873237e..d91b012 100644
--- a/tests/static/depres.py
+++ b/tests/static/depres.py
@@ -38,6 +38,9 @@ DEPRES_DATA = {
( "p5 4", "cat/pkg:99/2" ),
),
+ 'selfdeps': (
+ ),
+
'empty': DONT_RESOLVE_TUPLE ( "fftw", ),
# examples from doc/rst/usage.rst
@@ -136,6 +139,10 @@ DEPRES_RULES = {
'~cat/pkg:s=i99:/i2 :: p5',
),
+ 'selfdeps': (
+ '@selfdep', '~other-cat/pkg :: zoo',
+ ),
+
'empty': (),
# examples from doc/rst/usage.rst