diff options
author | yoni206 <yoni206@users.noreply.github.com> | 2021-05-28 13:28:56 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-05-28 20:28:56 +0000 |
commit | 40089fc79491a0608f36e6af9db69d2c12c37e3e (patch) | |
tree | 84cbabd73236653c64c19bd779ce6d2ad1ad9182 /src | |
parent | 15d38800b9f493fcf4573160b420f0ab9563b4a8 (diff) |
Python API: bugfix + translating tests from cpp unit tests (#6559)
This PR fixes an issue in the python API for datatypes, and also introduces tests translated from https://github.com/cvc5/cvc5/blob/master/test/unit/api/datatype_api_black.cpp
The next PR will translate more tests and will also introduce missing functions in the python API for datatypes.
Diffstat (limited to 'src')
-rw-r--r-- | src/api/python/cvc5.pxi | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/api/python/cvc5.pxi b/src/api/python/cvc5.pxi index 2fac78552..b2942e0b3 100644 --- a/src/api/python/cvc5.pxi +++ b/src/api/python/cvc5.pxi @@ -178,7 +178,7 @@ cdef class DatatypeConstructor: if isinstance(index, int) and index >= 0: ds.cds = self.cdc[(<int?> index)] elif isinstance(index, str): - ds.cds = self.cdc[(<const string &> name.encode())] + ds.cds = self.cdc[(<const string &> index.encode())] else: raise ValueError("Expecting a non-negative integer or string") return ds |