mirror of
https://github.com/Telecominfraproject/oopt-gnpy.git
synced 2025-10-31 18:18:00 +00:00
Update test_disjunction and test_automaticmodefeature
Add bidir argument on load_requests calls Signed-off-by: EstherLerouzic <esther.lerouzic@orange.com>
This commit is contained in:
@@ -35,7 +35,7 @@ eqpt_library_name = Path(__file__).parent.parent / 'tests/data/eqpt_config.json'
|
||||
@pytest.mark.parametrize("serv",[service_file_name])
|
||||
@pytest.mark.parametrize("expected_mode",[['16QAM', 'PS_SP64_1', 'PS_SP64_1', 'PS_SP64_1', 'mode 2 - fake', 'mode 2', 'PS_SP64_1', 'mode 3', 'PS_SP64_1', 'PS_SP64_1', '16QAM', 'mode 1', 'PS_SP64_1', 'PS_SP64_1', 'mode 1', 'mode 2', 'mode 1', 'mode 2', 'nok']])
|
||||
def test_automaticmodefeature(net,eqpt,serv,expected_mode):
|
||||
data = load_requests(serv,eqpt)
|
||||
data = load_requests(serv, eqpt, bidir=False)
|
||||
equipment = load_equipment(eqpt)
|
||||
network = load_network(net,equipment)
|
||||
|
||||
|
||||
@@ -29,7 +29,7 @@ eqpt_library_name = Path(__file__).parent.parent / 'tests/data/eqpt_config.json'
|
||||
@pytest.mark.parametrize("eqpt", [eqpt_library_name])
|
||||
@pytest.mark.parametrize("serv",[service_file_name])
|
||||
def test_disjunction(net,eqpt,serv):
|
||||
data = load_requests(serv,eqpt)
|
||||
data = load_requests(serv, eqpt, bidir=False)
|
||||
equipment = load_equipment(eqpt)
|
||||
network = load_network(net,equipment)
|
||||
|
||||
@@ -56,7 +56,7 @@ def test_disjunction(net,eqpt,serv):
|
||||
rqs_id_list = [r.request_id for r in rqs]
|
||||
p1 = pths[rqs_id_list.index(e[0])][1:-1]
|
||||
p2 = pths[rqs_id_list.index(e[1])][1:-1]
|
||||
if isdisjoint(p1,p2) + isdisjoint(p1,find_reversed_path(p2, network)) > 0:
|
||||
if isdisjoint(p1, p2) + isdisjoint(p1, find_reversed_path(p2)) > 0:
|
||||
test = False
|
||||
print(f'Computed path (roadms):{[e.uid for e in p1 if isinstance(e, Roadm)]}\n')
|
||||
print(f'Computed path (roadms):{[e.uid for e in p2 if isinstance(e, Roadm)]}\n')
|
||||
@@ -68,7 +68,7 @@ def test_disjunction(net,eqpt,serv):
|
||||
@pytest.mark.parametrize("eqpt", [eqpt_library_name])
|
||||
@pytest.mark.parametrize("serv",[service_file_name])
|
||||
def test_does_not_loop_back(net,eqpt,serv):
|
||||
data = load_requests(serv,eqpt)
|
||||
data = load_requests(serv, eqpt, bidir=False)
|
||||
equipment = load_equipment(eqpt)
|
||||
network = load_network(net,equipment)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user