python: fix incorrect assertions on temporary objects

* tests/python/stutter.py: Do not call acc() on a temporary
object, and fix the last two asserts.
This commit is contained in:
Alexandre Duret-Lutz 2021-01-17 18:27:52 +01:00
parent b7accdcf0d
commit 91fc622d00

View file

@ -1,5 +1,5 @@
# -*- mode: python; coding: utf-8 -*- # -*- mode: python; coding: utf-8 -*-
# Copyright (C) 2019, 2020 Laboratoire de Recherche et Développement de # Copyright (C) 2019-2021 Laboratoire de Recherche et Développement de
# l'Epita (LRDE). # l'Epita (LRDE).
# #
# This file is part of Spot, a model checking library. # This file is part of Spot, a model checking library.
@ -58,5 +58,7 @@ assert str(w2) == 'cycle{!Y1 & !Y2 & x; Y1 & Y2 & x; Y1 & Y2 & x}'
pos = spot.translate('Xa & XXb') pos = spot.translate('Xa & XXb')
w = pos.accepting_word().as_automaton() w = pos.accepting_word().as_automaton()
assert w.acc().is_t() assert w.acc().is_t()
assert not spot.sl2(w).acc().is_buchi() a = spot.sl2(w)
assert not spot.sl(w).acc().is_buchi() assert a.acc().is_buchi()
a = spot.sl(w)
assert a.acc().is_buchi()