From ed52f3c48ccda8ee45660c8a776d794ac9dba8bb Mon Sep 17 00:00:00 2001 From: Alexandre Duret-Lutz Date: Tue, 18 Jun 2019 17:30:16 +0200 Subject: [PATCH] re-enable tests incorrectly disabled These were disabled by mistake in f6575d2ec. * tests/python/parity.py: Uncomment test cases. --- tests/python/parity.py | 82 +++++++++++++++++++++--------------------- 1 file changed, 41 insertions(+), 41 deletions(-) diff --git a/tests/python/parity.py b/tests/python/parity.py index 75ee45a3b..738fb18d8 100644 --- a/tests/python/parity.py +++ b/tests/python/parity.py @@ -21,47 +21,47 @@ import spot -# for f in ('FGa', 'GFa & GFb & FGc', 'XXX(a U b)'): -# a1 = spot.translate(f, 'parity') -# assert a1.acc().is_parity() -# a2 = spot.translate(f).postprocess('parity') -# assert a2.acc().is_parity() -# a3 = spot.translate(f, 'det').postprocess('parity', 'colored') -# assert a3.acc().is_parity() -# assert spot.is_colored(a3) -# -# a = spot.translate('GFa & GFb') -# try: -# spot.change_parity_here(a, spot.parity_kind_same, spot.parity_style_even) -# except RuntimeError as e: -# assert 'input should have parity acceptance' in str(e) -# else: -# exit(2) -# -# a = spot.automaton(""" -# HOA: v1 -# States: 1 -# Start: 0 -# AP: 1 "a" -# Acceptance: 2 Fin(0) & Inf(1) -# --BODY-- -# State: 0 -# [t] 0 {0} -# --END-- -# """) -# spot.cleanup_parity_here(a) -# assert a.to_str() == """HOA: v1 -# States: 1 -# Start: 0 -# AP: 1 "a" -# acc-name: none -# Acceptance: 0 f -# properties: trans-labels explicit-labels state-acc complete -# properties: deterministic -# --BODY-- -# State: 0 -# [t] 0 -# --END--""" +for f in ('FGa', 'GFa & GFb & FGc', 'XXX(a U b)'): + a1 = spot.translate(f, 'parity') + assert a1.acc().is_parity() + a2 = spot.translate(f).postprocess('parity') + assert a2.acc().is_parity() + a3 = spot.translate(f, 'det').postprocess('parity', 'colored') + assert a3.acc().is_parity() + assert spot.is_colored(a3) + +a = spot.translate('GFa & GFb') +try: + spot.change_parity_here(a, spot.parity_kind_same, spot.parity_style_even) +except RuntimeError as e: + assert 'input should have parity acceptance' in str(e) +else: + exit(2) + +a = spot.automaton(""" +HOA: v1 +States: 1 +Start: 0 +AP: 1 "a" +Acceptance: 2 Fin(0) & Inf(1) +--BODY-- +State: 0 +[t] 0 {0} +--END-- +""") +spot.cleanup_parity_here(a) +assert a.to_str() == """HOA: v1 +States: 1 +Start: 0 +AP: 1 "a" +acc-name: none +Acceptance: 0 f +properties: trans-labels explicit-labels state-acc complete +properties: deterministic +--BODY-- +State: 0 +[t] 0 +--END--""" a = spot.automaton(""" HOA: v1