adjust some python tests to work with PyPy

Part of #467.

* tests/python/bdddict.py, tests/python/ltl2tgba.py,
tests/python/ltlparse.py, tests/python/ltlsimple.py,
tests/python/sccinfo.py, tests/python/simstate.py,
tests/python/split.py, tests/python/tra2tba.py: Adjust to
deal with a non-refcounted Python implementation.
This commit is contained in:
Alexandre Duret-Lutz 2021-06-29 23:16:40 +02:00
parent 47348a9755
commit 3d79022abb
8 changed files with 141 additions and 25 deletions

View file

@ -1,5 +1,5 @@
# -*- mode: python; coding: utf-8 -*-
# Copyright (C) 2009-2012, 2014-2017, 2019 Laboratoire de Recherche et
# Copyright (C) 2009-2012, 2014-2017, 2019, 2021 Laboratoire de Recherche et
# Développement de l'Epita (LRDE).
# Copyright (C) 2003, 2004 Laboratoire d'Informatique de Paris 6 (LIP6),
# département Systèmes Répartis Coopératifs (SRC), Université Pierre
@ -199,6 +199,12 @@ for (x, msg) in [('a->', "missing right operand for \"implication operator\""),
assert msg in err
del f9
# force GC before fnode_instances_check(), unless it's CPython
from platform import python_implementation
if python_implementation() != 'CPython':
import gc
gc.collect()
assert spot.fnode_instances_check()
f = spot.formula_F(2, 4, spot.formula_ap("a"))