|
|
@ -4,7 +4,7 @@ import unittest
|
|
|
|
from collections import OrderedDict
|
|
|
|
from collections import OrderedDict
|
|
|
|
|
|
|
|
|
|
|
|
from . import new_pkg_universe_builder
|
|
|
|
from . import new_pkg_universe_builder
|
|
|
|
from britney2.installability.solver import compute_scc, InstallabilitySolver
|
|
|
|
from britney2.installability.solver import compute_scc, InstallabilitySolver, OrderNode
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class TestInstTester(unittest.TestCase):
|
|
|
|
class TestInstTester(unittest.TestCase):
|
|
|
@ -513,34 +513,40 @@ class TestInstTester(unittest.TestCase):
|
|
|
|
|
|
|
|
|
|
|
|
graph = OrderedDict()
|
|
|
|
graph = OrderedDict()
|
|
|
|
|
|
|
|
|
|
|
|
graph['A'] = {
|
|
|
|
def _order_node(**args):
|
|
|
|
'before': ['C', 'B'],
|
|
|
|
node = OrderNode()
|
|
|
|
'after': ['A0'],
|
|
|
|
node.before = args['before']
|
|
|
|
}
|
|
|
|
node.after = args['after']
|
|
|
|
graph['B'] = {
|
|
|
|
return node
|
|
|
|
'before': ['F'],
|
|
|
|
|
|
|
|
'after': ['A'],
|
|
|
|
graph['A'] = _order_node(
|
|
|
|
}
|
|
|
|
before=['C', 'B'],
|
|
|
|
graph['C'] = {
|
|
|
|
after=['A0'],
|
|
|
|
'before': ['E', 'D'],
|
|
|
|
)
|
|
|
|
'after': ['A'],
|
|
|
|
graph['B'] = _order_node(
|
|
|
|
}
|
|
|
|
before=['F'],
|
|
|
|
graph['D'] = {
|
|
|
|
after=['A'],
|
|
|
|
'before': [],
|
|
|
|
)
|
|
|
|
'after': ['C']
|
|
|
|
graph['C'] = _order_node(
|
|
|
|
}
|
|
|
|
before=['E', 'D'],
|
|
|
|
graph['E'] = {
|
|
|
|
after=['A'],
|
|
|
|
'before': ['B'],
|
|
|
|
)
|
|
|
|
'after': ['C']
|
|
|
|
graph['D'] = _order_node(
|
|
|
|
}
|
|
|
|
before=[],
|
|
|
|
graph['F'] = {
|
|
|
|
after=['C'],
|
|
|
|
'before': [],
|
|
|
|
)
|
|
|
|
'after': ['B']
|
|
|
|
graph['E'] = _order_node(
|
|
|
|
}
|
|
|
|
before=['B'],
|
|
|
|
graph['A0'] = {
|
|
|
|
after=['C']
|
|
|
|
'before': ['A0'],
|
|
|
|
)
|
|
|
|
'after': []
|
|
|
|
graph['F'] = _order_node(
|
|
|
|
}
|
|
|
|
before=[],
|
|
|
|
|
|
|
|
after=['B'],
|
|
|
|
|
|
|
|
)
|
|
|
|
|
|
|
|
graph['A0'] = _order_node(
|
|
|
|
|
|
|
|
before=['A0'],
|
|
|
|
|
|
|
|
after=[],
|
|
|
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
# We also assert that the order is correct to ensure that
|
|
|
|
# We also assert that the order is correct to ensure that
|
|
|
|
# nodes were visited in the order we expected (the bug is
|
|
|
|
# nodes were visited in the order we expected (the bug is
|
|
|
|