Exemple #1
0
import pytest

import pycarl

# Skip not supported functionality
cln = pytest.mark.skipif(not pycarl.has_cln(), reason="No support for CLN")
parser = pytest.mark.skipif(not pycarl.has_parser(), reason="No support for carlparser")

# Parametrize available number types
import pycarl.gmp

parameters = [pycarl.gmp]
names = ["gmp"]

if pycarl.has_cln():
    import pycarl.cln

    parameters.append(pycarl.cln)
    names.append("cln")


class PackageSelector:
    @pytest.fixture(params=parameters, ids=names)
    def package(self, request):
        return request.param
Exemple #2
0
 def test_config(self):
     import pycarl
     assert pycarl.carl_version()
     assert pycarl.has_parser() == True or pycarl.has_parser() == False
     assert pycarl.has_cln() == True or pycarl.has_cln() == False
Exemple #3
0
import pycarl
import pycarl.convert
import pycarl.formula
import pycarl.gmp
import pycarl.gmp.formula

if pycarl.has_cln():
    import pycarl.cln
    import pycarl.cln.formula
Exemple #4
0
 def convert_to_storm_type(data):
     assert pycarl.has_cln()
     return pycarl.convert.convert_to_cln(data)